Package: hddtemp
Version: 0.3-beta15-34
Severity: minor

# hddtemp -n -u F /dev/hda
Segmentation fault

in gdb:

Program received signal SIGSEGV, Segmentation fault.
0x0804aec8 in value_to_unit (dsk=0x8050858) at hddtemp.c:101
101         if(dsk->db_entry->unit == 'C')
(gdb) where
#0  0x0804aec8 in value_to_unit (dsk=0x8050858) at hddtemp.c:101
#1  0x0804b215 in do_direct_mode (ldisks=0x8050858) at hddtemp.c:204
#2  0x0804b9fe in main (argc=-1477443408, argv=0xa7f02560) at hddtemp.c:526

In the GETTEMP_GUESS case, dsk->db_entry is NULL, so this crashes.  I
actually noticed this because "hddtemp -u F /dev/hda" was giving me
results in C not F, and I was trying to figure out why.  

If the tool is guessing, the unit flag is ignored (see the code).  I'm
not sure why this is done that way, but bug 365413 is kind of
relevant.  Now that there is a -u flag, I'd think the conversion
should apply in the GUESS and KNOWN code paths.

Finally, the --unit/-u flag is not documented in the man page.

                Marc

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-2-k7
Locale: LANG=en_US.ISO8859-1, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)

Versions of packages hddtemp depends on:
ii  debconf [debconf-2.0]        1.5.3       Debian configuration management sy
ii  libc6                        2.3.6.ds1-4 GNU C Library: Shared libraries
ii  lsb-base                     3.1-14      Linux Standard Base 3.1 init scrip

hddtemp recommends no packages.

-- debconf information:
* hddtemp/SUID_bit: false
  hddtemp/interface: 127.0.0.1
* hddtemp/syslog: 0
* hddtemp/daemon: false
  hddtemp/port: 7634


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

Reply via email to