summaryrefslogtreecommitdiff
path: root/mpz/gcdext.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2011-05-09 21:38:01 +0200
committerNiels Möller <nisse@lysator.liu.se>2011-05-09 21:38:01 +0200
commit1a4674af539c26d915e230a8e6888ad2460c7ad8 (patch)
tree7445da7f00cb76c76cd90370b9d11faf2a53c331 /mpz/gcdext.c
parent47335917564f5e80429febf9f08174887e265dd4 (diff)
downloadgmp-1a4674af539c26d915e230a8e6888ad2460c7ad8.tar.gz
Fixed allocation for mpn_gcdext cofactor argument.
Diffstat (limited to 'mpz/gcdext.c')
-rw-r--r--mpz/gcdext.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpz/gcdext.c b/mpz/gcdext.c
index 9867a2eee..e718f5fe1 100644
--- a/mpz/gcdext.c
+++ b/mpz/gcdext.c
@@ -77,7 +77,7 @@ mpz_gcdext (mpz_ptr g, mpz_ptr s, mpz_ptr t, mpz_srcptr a, mpz_srcptr b)
MPN_COPY (tmp_bp, bp, bsize);
tmp_gp = TMP_ALLOC_LIMBS (bsize);
- tmp_sp = TMP_ALLOC_LIMBS (bsize);
+ tmp_sp = TMP_ALLOC_LIMBS (bsize + 1);
gsize = mpn_gcdext (tmp_gp, tmp_sp, &tmp_ssize, tmp_ap, asize, tmp_bp, bsize);