mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 13:49:17 +02:00
Fix potential memory overwrite in sexp_bignum_fxmul.
Patch from Lorenzo.
This commit is contained in:
parent
20aa69033c
commit
179aea56a0
1 changed files with 1 additions and 1 deletions
2
bignum.c
2
bignum.c
|
@ -183,7 +183,7 @@ sexp sexp_bignum_fxmul (sexp ctx, sexp d, sexp a, sexp_uint_t b, int offset) {
|
||||||
sexp_gc_var1(tmp);
|
sexp_gc_var1(tmp);
|
||||||
sexp_gc_preserve1(ctx, tmp);
|
sexp_gc_preserve1(ctx, tmp);
|
||||||
if ((! d) || (sexp_bignum_length(d) < len+offset))
|
if ((! d) || (sexp_bignum_length(d) < len+offset))
|
||||||
d = tmp = sexp_make_bignum(ctx, len);
|
d = tmp = sexp_make_bignum(ctx, len+offset);
|
||||||
else
|
else
|
||||||
tmp = d;
|
tmp = d;
|
||||||
data = sexp_bignum_data(d);
|
data = sexp_bignum_data(d);
|
||||||
|
|
Loading…
Add table
Reference in a new issue