summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-19 02:13:21 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-19 02:13:21 +0000
commitde7245982714246631617299b6501fa0a0f472d7 (patch)
tree362cc8e88367c6c99f8e1d4153e3304baa718b8e
parentd9a45b677e559457bdef2118cd2829cce67501fa (diff)
* bignum.c (bigtrunc): RBIGNUM(x)->len may be zero. out of bound
access. [ruby-dev:31404] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--bignum.c1
-rw-r--r--version.h8
3 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 3364b09..b4e3408 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Sep 19 11:13:07 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * bignum.c (bigtrunc): RBIGNUM(x)->len may be zero. out of bound
+ access. [ruby-dev:31404]
+
Mon Sep 17 05:24:13 2007 Sylvain Joyeux <sylvain.joyeux@m4x.org>
* ext/thread/thread.c (lock_mutex): should take care of threads
diff --git a/bignum.c b/bignum.c
index 547759f..788eb4b 100644
--- a/bignum.c
+++ b/bignum.c
@@ -103,6 +103,7 @@ bigtrunc(x)
long len = RBIGNUM(x)->len;
BDIGIT *ds = BDIGITS(x);
+ if (len == 0) return x;
while (--len && !ds[len]);
RBIGNUM(x)->len = ++len;
return x;
diff --git a/version.h b/version.h
index a04d9b7..004743f 100644
--- a/version.h
+++ b/version.h
@@ -1,15 +1,15 @@
#define RUBY_VERSION "1.8.6"
-#define RUBY_RELEASE_DATE "2007-09-17"
+#define RUBY_RELEASE_DATE "2007-09-19"
#define RUBY_VERSION_CODE 186
-#define RUBY_RELEASE_CODE 20070917
-#define RUBY_PATCHLEVEL 106
+#define RUBY_RELEASE_CODE 20070919
+#define RUBY_PATCHLEVEL 107
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 6
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 9
-#define RUBY_RELEASE_DAY 17
+#define RUBY_RELEASE_DAY 19
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];