Package: procps
Version: 1:3.3.4-2
Severity: normal
File: /usr/bin/free

when the option -s (--seconds) is used as the first option to the
commanf free, then the option value isn't parsed correctly. When it is
used after the opting -c (--count), it is parsed ok. see my log below.

vincent@PC-Vincent:~$ free -s 1
free: seconds argument `1' failed
vincent@PC-Vincent:~$ free -s 1 -c 1
free: seconds argument `1' failed
vincent@PC-Vincent:~$ free -c 1 -s 1
             total       used       free     shared    buffers     cached
Mem:       6128744    2795108    3333636          0     127388    1107340
-/+ buffers/cache:    1560380    4568364
Swap:      4194300          0    4194300
vincent@PC-Vincent:~$

Analysing hte source shows that the error check of the function strtof()
is incorrect. The source just checks the value of errno, but a correct
functioning of strtof() is signaled by (see man page):

        If no conversion is performed, zero is returned and the value
        of nptr is stored in the location referenced by endptr.

Please correct the error check for the function strtof().

Regards,
Vincent Smeets

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.11-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=nl_NL.UTF-8, LC_CTYPE=nl_NL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages procps depends on:
ii  initscripts   2.88dsf-43
ii  libc6         2.17-97
ii  libncurses5   5.9+20130608-1
ii  libncursesw5  5.9+20130608-1
ii  libprocps0    1:3.3.4-2
ii  libtinfo5     5.9+20130608-1
ii  lsb-base      4.1+Debian12

Versions of packages procps recommends:
ii  psmisc  22.20-1

procps suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to