[patch] Fix BZ 19165 -- overflow in fread / fwrite
Paul Pluzhnikov
ppluzhnikov@google.com
Thu Dec 10 19:43:00 GMT 2015
On Mon, Dec 7, 2015 at 10:52 AM, Paul Eggert <eggert@cs.ucla.edu> wrote:
> The above comments suggest that this patch is part of a larger maintenance
> problem with glibc and integer overflow checking. To simplify maintenance,
> I suggest instead that we leave cdefs.h alone, and instead copy and include
> gnulib's intprops.h for internal use only inside glibc, and use intprops.h's
> macro 'INT_MULTIPLY_OVERFLOW (a, b)' instead of defining and using
> '__umul_size_t_overflow (a, b)'. This would simplify maintenance in the
> long run, as it already incorporates all the above comments. Please see:
>
> http://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/intprops.h
Sigh. A "simple" overflow check in _IO_fread turned into a multi-month
ordeal ...
While I agree that what you are proposing is probably better, I am not
currently prepared to undertake that change. I'll un-assign BZ19165
from myself instead.
--
Paul Pluzhnikov
More information about the Libc-alpha
mailing list