This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix BZ 19165 -- overflow in fread / fwrite


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]