This is the mail archive of the
glibc-cvs@sources.redhat.com
mailing list for the glibc project.
libc/libidn iconvme.c
- From: roland at sourceware dot org
- To: glibc-cvs at sources dot redhat dot com
- Date: 15 Mar 2005 22:21:09 -0000
- Subject: libc/libidn iconvme.c
CVSROOT: /cvs/glibc
Module name: libc
Changes by: roland@sources.redhat.com 2005-03-15 22:21:09
Modified files:
libidn : iconvme.c
Log message:
2005-03-08 Paul Eggert <eggert@cs.ucla.edu>
* iconvme.c (SIZE_MAX): New macro, if not already defined.
(iconv_string): Don't guess a size-zero buffer, as that might cause
buffer overrun. Instead, avoid multiplying by MB_LEN_MAX if the
result would be 'too large', where 'too large' is (heuristically)
the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
overflow concerns. This will prevent some unwanted malloc failures
when the inputs are very large.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/libidn/iconvme.c.diff?cvsroot=glibc&r1=1.1&r2=1.2