This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/756] missing arithmetic overflow check
- From: "jakub at redhat dot com" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 23 Feb 2005 23:44:47 -0000
- Subject: [Bug libc/756] missing arithmetic overflow check
- References: <20050222195246.756.simon@josefsson.org>
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
------- Additional Comments From jakub at redhat dot com 2005-02-23 23:44 -------
You are right, the overflow can happen for inbytes_remaining
being (SIZE_MAX/MB_LEN_MAX)+N*(SIZE_MAX/MB_LEN_MAX+1) for N=0,1,...
Still, I think the test would be better written as
if (outbuf_size == 0)
{
errno = ENOMEM;
return NULL;
}
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=756
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.