This is the mail archive of the glibc-bugs@sources.redhat.com 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/756] missing arithmetic overflow check


------- 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.


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