This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: libcpp/charset: close out shift states


>>>>> "DJ" == DJ Delorie <dj@redhat.com> writes:

DJ> +	  /* Close out any shift states, returning to the initial state.  */
DJ> +	  if (iconv (cd, 0, 0, &outbuf, &outbytesleft) == (size_t)-1)
DJ> +	    return false;

What if this new iconv call returns -1 with errno==E2BIG?  In this
case, we will return false -- but I think what we really want to do is
resize the output buffer and try again.

I think with a change to fix this problem, this is ok.

Tom


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