[PATCH 1/2] iconv_prog: Don't slurp whole input at once [BZ #6050]

Andreas Schwab schwab@linux-m68k.org
Sun Aug 9 22:31:00 GMT 2015


Benjamin Herr <ben@0x539.de> writes:

> +static int

s/int/size_t/

> +saturating_add (size_t a, size_t b)
> +{
> +  if ((size_t) -1 - a > b)
> +    return a + b;
> +  else
> +    return -1;
> +}

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Libc-alpha mailing list