diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-01 08:56:09 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-01 08:56:09 +0000 |
commit | 10d3f6a039fb05c309243f8937c36bd3b5a6f724 (patch) | |
tree | 23492439ba53ae961fcb201be1dd3133e2ad034c /bignum.c | |
parent | 9e8d096c83d6b5ae25928f6f72806ba04f327cfe (diff) | |
download | ruby-10d3f6a039fb05c309243f8937c36bd3b5a6f724.tar.gz |
* bignum.c (rb_big_neg): may be accessing bogus pointer value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1055,10 +1055,12 @@ rb_big_neg(x) VALUE x; { VALUE z = rb_big_clone(x); - BDIGIT *ds = BDIGITS(z); - long i = RBIGNUM(x)->len; + BDIGIT *ds; + long i; if (!RBIGNUM(x)->sign) get2comp(z); + ds = BDIGITS(z); + i = RBIGNUM(x)->len; while (i--) { ds[i] = ~ds[i]; } |