SHA256
1
0
forked from pool/gmp
gmp/gmp-4.2.1-mpz_set_d.diff

13 lines
166 B
Diff

--- mpz/set_d.c
+++ mpz/set_d.c
@@ -56,6 +56,9 @@
if (ALLOC(r) < rn)
_mpz_realloc (r, rn);
+ if (rn <= 0)
+ rn = 0;
+
rp = PTR (r);
switch (rn)