This is the mail archive of the glibc-bugs@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]

[Bug libc/9914] possible signed integer overflow in libio/iogetdelim.c


http://sourceware.org/bugzilla/show_bug.cgi?id=9914

Rich Felker <bugdal at aerifal dot cx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |

--- Comment #5 from Rich Felker <bugdal at aerifal dot cx> 2011-10-29 21:19:49 UTC ---
Whether gcc optimizes this away probably depends on the compiler version and
options. I would have to read the code in greater detail to claim that this is
definitely the case, but it's likely that it's provable that cur_len and len
are always non-negative. Even if not, the code is invoking undefined behavior,
so there are other reasons the test could fail to work as expected. I already
submitted a fix; please apply or write your own better fix if you prefer.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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