This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/9914] New: possible signed integer overflow in libio/iogetdelim.c
- From: "aurelien at aurel32 dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 1 Mar 2009 17:36:06 -0000
- Subject: [Bug libc/9914] New: possible signed integer overflow in libio/iogetdelim.c
- Reply-to: sourceware-bugzilla at sourceware dot org
glibc does not compile at -O0 and -fstrict-overflow is enabled starting at -O1,
meaning that -fstrict-overflow is always enabled.
As a result, this code from libio/iogetdelim.c is wrong as gcc is free to
optimize it out in case of overflow:
if (__builtin_expect (cur_len + len + 1 < 0, 0))
{
__set_errno (EOVERFLOW);
result = -1;
goto unlock_return;
}
--
Summary: possible signed integer overflow in libio/iogetdelim.c
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: aurelien at aurel32 dot net
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=9914
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.