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 02/11/2016 07:58 AM, Zack Weinberg wrote:
I don't think anyone wants the behavior to vary depending on which
kind of fd you have passed to read().

As an application developer I'd rather have 'read', 'fread', etc. fail, or even dump core, if I give them a buffer that is not entirely valid. I hope, for example, that checkers like valgrind object to this sort of thing, and would find it useful if glibc continues to report it as an error. If POSIX really requires that 'read' and 'fread' must succeed in this situation, then from my point of view it's a POSIX bug that needs to get fixed, as the benefit of the extra checking is significant.


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