1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/iconv/iconv.c (iconv_convert): check upper bound. a patch from

Daniel Luz at [ruby-Bugs-17910].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-02-15 06:23:14 +00:00
parent 17fb1248af
commit 748beee825
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Fri Feb 15 15:23:12 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/iconv/iconv.c (iconv_convert): check upper bound. a patch from
Daniel Luz at [ruby-Bugs-17910].
Fri Feb 15 10:35:54 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* re.c (rb_reg_quote): set US-ACII for ASCII-only string.

View file

@ -380,8 +380,11 @@ iconv_convert(iconv_t cd, VALUE str, int start, int length, int toidx, struct ic
length = 0;
else if ((length -= start) < 0)
length = 0;
else
else {
inptr += start;
if (length > slen)
length = slen;
}
}
instart = inptr;
inlen = length;