linux-ftools
linux-ftools copied to clipboard
crash in error printing
See man 3 sprintf, first argument is a buffer, not format string.
Patch attached. Also squeeze the output (should squeeze even more), open files
read-only, do not call mmap on empty files and directories (it will fail
anyway), put the file name in the summary at the end so that the table stays
aligned with long paths too.
Original issue reported on code.google.com by ygrekheretix on 7 Sep 2010 at 1:53
Attachments:
Hi,
I noticed the same problems with sprintf() and table alignment.
I also added fixes for 32-bit architecture (although mmap will fail for files
>2GB but at least it gets the size right).
Another feature is --all-files which will browse /proc and display all opened
files and their cache usage.
Original comment by [email protected] on 31 Oct 2010 at 5:02
Attachments:
Also, strerror() needs string.h or it will crash in Centos5 x86_64.
Original comment by [email protected] on 31 Oct 2010 at 5:39
nice... I didn't see these comments but we will try to merge the patches soon.
Original comment by [email protected] on 19 Apr 2012 at 7:22