Package: libgpod0
Version: 0.3.2-1
Severity: important

When I connect my iPod (original series) and run a program linked with
libgpod0 I get a segmentation fault.

Example:

 $ gtkpod
 Segmentation fault
 $

(If I run Rhythmbox, it dies as well).

I think it is due to the fact that the SysInfo-file on my iPod does
not have a "ModelNumStr"-line:

,----[ SysInfo ]
| pszBoardHwName: iPod P68 Prod
| pszSerialNumber: U22080PLLG6
| pu8FirewireGuid: 0x0002DBB0
| buildID: 0x01218000 (1.2.1)
| boardHwRev: 0x00000000 (0.0 0)
| boardHwSwInterfaceRev: 0x00010000 (0.0.1 0)
| bootLoaderImageRev: 0x00010000 (0.0.1 0)
| diskModeImageRev: 0x00000000 (0.0 0)
| diagImageRev: 0x00000000 (0.0 0)
| osImageRev: 0x00000000 (0.0 0)
| 
| 
| 
`----

The call to sysinfo_arr_get_dup() in line 1029 of src/ipod-device.c
results in the segmentation fault - because the function accesses a
non-initialized string in field_values[].

I've tried this, perhaps crude, patch to remedy the situation:

*** libgpod-0.3.2/src/ipod-device.c     Fri Mar  3 12:55:15 2006
--- libgpod-0.3.2-fixed/src/ipod-device.c       Sun Jun 18 23:11:37 2006
***************
*** 1002,1008 ****
                g_free(path);
                return FALSE;
        }
! 
        while(fgets(buf, sizeof(buf), fd)) {
                buf[strlen(buf) - 1] = '\0';
  
--- 1002,1013 ----
                g_free(path);
                return FALSE;
        }
! 
!       /* Initialize field_values: */
!       for (i=0; sysinfo_field_names[i] != NULL; i++) {
!               field_values[i]=g_strdup("");
!       }
! 
        while(fgets(buf, sizeof(buf), fd)) {
                buf[strlen(buf) - 1] = '\0';
  

I don't know if it is the correct way to fix the problem, but it does
help on my system - I can start gtkpod now.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-asjo-powerpc
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libgpod0 depends on:
ii  libc6                         2.3.6-15   GNU C Library: Shared libraries
ii  libglib2.0-0                  2.10.3-1   The GLib library of C routines
ii  libgtk2.0-0                   2.8.18-1   The GTK+ graphical user interface 

Versions of packages libgpod0 recommends:
pn  libgpod-common                <none>     (no description available)

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to