summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-15 10:19:52 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-15 10:19:52 +0000
commit0f2b4fbcd847ccf3e9e2caef9582081e8f1ffc3b (patch)
tree5e36a4fca144fa90942974d622fb776b4a61ec1f
parentf08d1b2ee827bb23036d238580c15a1f92dbf233 (diff)
merge revision(s) 15482:
* 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/branches/ruby_1_8_5@17175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/iconv/iconv.c5
-rw-r--r--version.h2
3 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 73e61628625..fb251465912 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Jun 15 19:19:21 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].
+
Sun Jun 15 19:07:41 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (ftruncate): check if available.
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 918dd516301..484abd203d5 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -423,8 +423,11 @@ iconv_convert
length = 0;
else if ((length -= start) < 0)
length = 0;
- else
+ else {
inptr += start;
+ if (length > slen)
+ length = slen;
+ }
}
instart = inptr;
inlen = length;
diff --git a/version.h b/version.h
index f5cf4f93941..e0f045aaf02 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-15"
#define RUBY_VERSION_CODE 185
#define RUBY_RELEASE_CODE 20080615
-#define RUBY_PATCHLEVEL 177
+#define RUBY_PATCHLEVEL 178
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8