Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Mar 2002 09:42:13 +0000
From:      Konstantin Chuguev <Konstantin.Chuguev@dante.org.uk>
To:        "Akinori MUSHA" <knu@iDaemons.org>
Cc:        FreeBSD-ports <ports@FreeBSD.org>
Subject:   Re: fixes for iconv 2.0
Message-ID:  <6D265C47-3A54-11D6-9E92-000393849AE0@dante.org.uk>
In-Reply-To: <86wuwansdz.wl@archon.local.idaemons.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Akinori-san,

Please submit the patch to the ports. The library is in a hibernation 
state,  it has not been updated for more than a year. I hope one day 
either someone will take it over from me or I try and do something with 
it myself. In the latter case, I'll use your fix.

Thanks,
	Konstantin.

On Monday, March 18, 2002, at 09:21  am, Akinori MUSHA wrote:

> Hi,
>
> Do you still maintain this library?  I have a patch to fix some bugs
> where iconv() doesn't properly return -1 on conversion error.
>
> Reported by: Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
>
> --
>                      /
>                     /__  __            Akinori.org / MUSHA.org
>                    / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
> Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp
>
> "Somewhere out of a memory.. of lighted streets on quiet nights.."
>
> --- lib/converter.c.orig	Sun Nov 26 22:10:22 2000
> +++ lib/converter.c	Mon Mar 18 17:55:50 2002
> @@ -92,14 +92,14 @@
>  		if (ch == UCS_CHAR_NONE) {
>  			/* Incomplete character in input buffer */
>  			errno = EINVAL;
> -			return res;
> +			return (size_t)(-1);
>  		}
>  		if (ch == UCS_CHAR_INVALID) {
>  			/* Invalid character in source buffer */
>  			*inbytesleft += *inbuf - ptr;
>  			*inbuf = ptr;
>  			errno = EILSEQ;
> -			return res;
> +			return (size_t)(-1);
>  		}
>  		size = ICONV_CES_CONVERT_FROM_UCS(&(uc->to), ch,
>  		                                  outbuf, outbytesleft);
> @@ -116,7 +116,7 @@
>  			*inbytesleft += *inbuf - ptr;
>  			*inbuf = ptr;
>  			errno = E2BIG;
> -			return res;
> +			return (size_t)(-1);
>  		}
>  	}
>  	return res;
> @@ -163,8 +163,10 @@
>  		*inbytesleft -= len;
>  		*outbuf += len;
>  		*outbytesleft -= len;
> +		return 0;
>  	}
> -	return 0;
> +
> +	return (size_t)(-1);
>  }
>
>  iconv_converter *
>
--
          * *             Konstantin Chuguev                 Francis House
       *      *           Applications Engineer               112 Hills 
Road
     *                    Tel: +44 1223 302992              Cambridge CB2 
1PQ
D  A  N  T  E      WWW: http://www.dante.net/    United Kingdom


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6D265C47-3A54-11D6-9E92-000393849AE0>