[PATCH] Check for overflow in __alloc_dir
Florian Weimer
fweimer@redhat.com
Mon Oct 15 11:18:00 GMT 2012
On 10/12/2012 07:57 PM, Roland McGrath wrote:
>> On 10/12/2012 04:54 PM, Roland McGrath wrote:
>>> Use a macro for the constant and give it a comment about the choice of value.
>>> Don't ignore a large st_blksize, just use MAX (st_blksize, MAX_ALLOCATION).
>>
>> Sorry, I don't understand. Do you mean MIN (st_blksize, MAX_ALLOCATION)?
>
> Yes, sorry.
Is this what you had in mind?
I no longer use MIN/MAX for clamping because it's so counter-intuitive.
As far as I can tell, this doesn't cause any regressions on
x86_64-redhat-linux-gnu.
--
Florian Weimer / Red Hat Product Security Team
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opendir-overflow.patch
Type: text/x-patch
Size: 1739 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20121015/efd5fef0/attachment.bin>
More information about the Libc-alpha
mailing list