ruby-changes:7312
From: nobu <ko1@a...>
Date: Mon, 25 Aug 2008 17:36:02 +0900 (JST)
Subject: [ruby-changes:7312] Ruby:r18831 (trunk): * transcode.c (rb_econv_substr_append): fix for buffer overrun.
nobu 2008-08-25 17:35:42 +0900 (Mon, 25 Aug 2008) New Revision: 18831 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18831 Log: * transcode.c (rb_econv_substr_append): fix for buffer overrun. Modified files: trunk/ChangeLog trunk/transcode.c Index: ChangeLog =================================================================== --- ChangeLog (revision 18830) +++ ChangeLog (revision 18831) @@ -1,7 +1,9 @@ -Mon Aug 25 17:34:10 2008 Nobuyoshi Nakada <nobu@r...> +Mon Aug 25 17:35:23 2008 Nobuyoshi Nakada <nobu@r...> * transcode.c (rb_econv_substr_append): fix for buffer overrun. + * win32/enc-setup.mak (BUILTIN_TRANSOBJS): added. + Mon Aug 25 14:22:21 2008 Yuki Sonoda (Yugui) <yugui@y...> * parse.y (YYSTYPE): struct RVarmap has been no longer Index: transcode.c =================================================================== --- transcode.c (revision 18830) +++ transcode.c (revision 18831) @@ -1360,8 +1360,9 @@ } ss = sp = (const unsigned char *)RSTRING_PTR(src) + off; se = ss + len; - ds = dp = (unsigned char *)RSTRING_PTR(dst) + dlen; + ds = (unsigned char *)RSTRING_PTR(dst); de = ds + rb_str_capacity(dst); + dp = ds += dlen; res = rb_econv_convert(ec, &sp, se, &dp, de, flags); off += sp - ss; len -= sp - ss; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/