yazgoo / linux-ftools

Automatically exported from code.google.com/p/linux-ftools
Other
22 stars 12 forks source link

crash in error printing #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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:

GoogleCodeExporter commented 9 years ago
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 gulik...@gmail.com on 31 Oct 2010 at 5:02

Attachments:

GoogleCodeExporter commented 9 years ago
Also, strerror() needs string.h or it will crash in Centos5 x86_64.

Original comment by gulik...@gmail.com on 31 Oct 2010 at 5:39

GoogleCodeExporter commented 9 years ago
nice... I didn't see these comments but we will try to merge the patches soon.

Original comment by burtona...@gmail.com on 19 Apr 2012 at 7:22