Package: conky
Version: 1.8.1-6
Severity: normal

Dear Maintainer,

when using Conky with a simple .conkyrc like this one:

$ cat ~/.conkyrc
use_xft yes 
xftfont DejaVu Sans Mono:size=12
out_to_console yes 
format_human_readable no #yes

TEXT
/usr ${fs_used /usr}/${fs_size /usr}
/var ${fs_used /var}/${fs_size /var}
$

I get those lines both in console and the X11-window:

/usr -2147483648/-2147483648
/var -2147483648/-2147483648

which is definitely wrong. If format_human_readable yes is set (that's the
default), the output is like expected:

/usr 5.08GiB/9.97GiB
/var 70.1GiB/79.9GiB

so the correct output would be something like (if bc is right):

/usr 5454608465.92B/10705205985.28B
/var 75269301862.4B/85791971737.6B

Those values are greater than my INT_MAX. A quick look in the code showed
fs.c:250 is using human_readable() in conky.c:596, which uses space_print():

conky.c:604
605         if (!format_human_readable) {
606                 spaced_print(buf, size, "%d", 6, round_to_int(num));

The >INT_MAX num becomes 'int' via round_to_int() (common.c:447), but
obviously a greater-than-int value can't somehow become integer. So it's
negative and we have the strange output.

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

Kernel: Linux 3.2.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages conky depends on:
ii  conky-std  1.8.1-6

conky recommends no packages.

conky 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