summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index 8fb76951e9..a4af506651 100644
--- a/bignum.c
+++ b/bignum.c
@@ -2800,7 +2800,7 @@ bary_divmod(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xds, s
if (xn + extra_words <= qn)
zds = qds;
else
- zds = ALLOCV_N(BDIGIT, tmpz, xn + extra_words);
+ zds = ALLOCV_N(BDIGIT, tmpz, zn);
MEMCPY(zds, xds, BDIGIT, xn);
BDIGITS_ZERO(zds+xn, zn-xn);