[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] iconvme again

From: Paul Eggert
Subject: Re: [bug-gnulib] iconvme again
Date: Tue, 22 Feb 2005 09:54:04 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Simon Josefsson <address@hidden> writes:

> Hello.  iconvme.* has been installed into libc.  This patch propose to
> add it to gnulib via libc.  What do you think?

There was something wrong with that email.  It claimed to have a file
iconvme.h, but the contents of that file were identical to the
contents of iconvme.c.  What caused that problem?  Can you please
resubmit the suggestion?

I did notice one unchecked arithmetic overflow.  This:

> +  size_t outbuf_size = (inbytes_remaining + 1) * MB_LEN_MAX;

can overflow and cause buffer overruns.  I suggest adding something
like this as a conservative check, just after the declarations:

    if (1 < MB_LEN_MAX && SIZE_MAX / MB_LEN_MAX <= inbytes_remaining)
        errno = ENOMEM;
        return NULL;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]