[PATCH] readelf.c: better checks for values returned by pread

Alexander Cherepanov cherepan at mccme.ru
Tue Dec 16 20:26:49 UTC 2014


Hi!

readelf.c uses pread() in several places and checks only for -1 in most 
of them. Hence it's happy with partial reads and valgrind show various 
errors concerning uninitialised values in such cases. Attached patch 
fixes it.

-- 
Alexander Cherepanov



-------------- next part --------------
A non-text attachment was scrubbed...
Name: better-checks-for-pread.patch
Type: text/x-patch
Size: 2421 bytes
Desc: not available
URL: <http://mx.gw.com/pipermail/file/attachments/20141216/d787b453/attachment.bin>


More information about the File mailing list