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;