From be2a1ad45bd7109843c88e650cba821bda718ae4 Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 8 Jul 2013 15:48:09 +0000 Subject: [PATCH] * bignum.c (biglsh_bang): Fix bignum digits under-run. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ bignum.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7ef4fef868..43365c401f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Jul 9 00:46:22 2013 Tanaka Akira + + * bignum.c (biglsh_bang): Fix bignum digits under-run. + Mon Jul 8 23:36:45 2013 Nobuyoshi Nakada * ext/dl/win32/lib/win32/registry.rb (Error, API): use WCHAR diff --git a/bignum.c b/bignum.c index 6e2758bae6..c93061d44f 100644 --- a/bignum.c +++ b/bignum.c @@ -4425,11 +4425,11 @@ biglsh_bang(BDIGIT *xds, long xn, unsigned long shift) zds = xds + xn - 1; xn -= s1 + 1; num = BIGLO(xds[xn]<>s3; num = BIGLO(xds[xn]< 0); + assert(xds <= zds); *zds = num; for (i = s1; i > 0; --i) *zds-- = 0;