Project

General

Profile

Bug #1280 » iconv.patch

cfis (Charlie Savage), 03/13/2009 05:06 PM

View differences:

ext/iconv/iconv.c (working copy)
if (0 <= outlen && outlen <= sizeof(buffer)) {
outlen = sizeof(buffer) - outlen;
if (NIL_P(error) || /* something converted */
outlen > inptr - tmpstart || /* input can't contain output */
(outlen < inptr - tmpstart && inlen > 0) || /* something skipped */
outlen > (size_t)(inptr - tmpstart) || /* input can't contain output */
(outlen < (size_t)(inptr - tmpstart) && inlen > 0) || /* something skipped */
memcmp(buffer, tmpstart, outlen)) /* something differs */
{
if (NIL_P(str)) {
(3-3/7)