[PATCH] Check for overflow in __alloc_dir

Florian Weimer fweimer@redhat.com
Fri Oct 12 12:54:00 GMT 2012


On 10/11/2012 10:17 PM, Roland McGrath wrote:

> If st_blksize might ever be any kind of bogus, then I think it's better
> just to cap it to some reasonable maximum (maybe a megabyte or two?).

Good idea.  What about this?  Manual testing shows that the large malloc 
attempt is gone, and there are no regressions.

-- 
Florian Weimer / Red Hat Product Security Team
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opendir-size.patch
Type: text/x-patch
Size: 1227 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20121012/69321eac/attachment.bin>


More information about the Libc-alpha mailing list