bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

xalloc-oversized PTRDIFF_MAX fix (was: checked integer arithmetic)


From: Paul Eggert
Subject: xalloc-oversized PTRDIFF_MAX fix (was: checked integer arithmetic)
Date: Wed, 14 Dec 2016 17:11:53 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

On 12/14/2016 04:26 PM, Paul Eggert wrote:
I suppose we should change xalloc_oversized to report an overflow if the resulting size would be greater than PTRDIFF_MAX. That should catch more potential problems in Gnulib and in Gnulib-using code.

Attached is a proposed patch to do that.

Attachment: 0001-xalloc-oversized-check-for-PTRDIFF_MAX-too.patch
Description: Source code patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]