[Gmp-commit] /var/hg/gmp-6.2: 4 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Sun Oct 18 17:29:03 UTC 2020


details:   /var/hg/gmp-6.2/rev/e738cce4cb43
changeset: 18095:e738cce4cb43
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Oct 18 19:16:46 2020 +0200
description:
-typos

details:   /var/hg/gmp-6.2/rev/21b955fb2614
changeset: 18096:21b955fb2614
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Oct 18 19:27:14 2020 +0200
description:
mini-gmp.c (mpz_out_str): Return 0 when base is out of range (spotted by Paul Eggert)

details:   /var/hg/gmp-6.2/rev/f908f6d92215
changeset: 18097:f908f6d92215
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Oct 18 19:28:27 2020 +0200
description:
mini-mpq.c (mpq_out_str): Return 0 when base is out of range.

details:   /var/hg/gmp-6.2/rev/b3ca6f0653b7
changeset: 18098:b3ca6f0653b7
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Oct 18 19:28:37 2020 +0200
description:
ChangeLog

diffstat:

 ChangeLog           |  2 +-
 configfsf.sub       |  2 +-
 mini-gmp/ChangeLog  |  5 +++++
 mini-gmp/mini-gmp.c |  4 +++-
 mini-gmp/mini-mpq.c |  2 ++
 5 files changed, 12 insertions(+), 3 deletions(-)

diffs (69 lines):

diff -r 5a9f2dbc4dd6 -r b3ca6f0653b7 ChangeLog
--- a/ChangeLog	Sun Oct 18 08:08:30 2020 +0200
+++ b/ChangeLog	Sun Oct 18 19:28:37 2020 +0200
@@ -9,7 +9,7 @@
 
 2020-10-14 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
-	* doc/gmp.texi (Number sequences): Remove redundancie. (spotted: TonyMcC)
+	* doc/gmp.texi (Number sequences): Remove redundancy. (spotted: TonyMcC)
 
 	* configfsf.sub: Updated to version 2020-10-13, from gnulib.
 	* configfsf.guess: Updated to version 2020-09-19, from gnulib.
diff -r 5a9f2dbc4dd6 -r b3ca6f0653b7 configfsf.sub
--- a/configfsf.sub	Sun Oct 18 08:08:30 2020 +0200
+++ b/configfsf.sub	Sun Oct 18 19:28:37 2020 +0200
@@ -1752,7 +1752,7 @@
 	nto-qnx*)
 		;;
 	os2-emx)
-	    	;;
+		;;
 	*-eabi* | *-gnueabi*)
 		;;
 	-*)
diff -r 5a9f2dbc4dd6 -r b3ca6f0653b7 mini-gmp/ChangeLog
--- a/mini-gmp/ChangeLog	Sun Oct 18 08:08:30 2020 +0200
+++ b/mini-gmp/ChangeLog	Sun Oct 18 19:28:37 2020 +0200
@@ -1,3 +1,8 @@
+2020-10-18 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+	* mini-mpq.c (mpq_out_str): Return 0 when base is out of range.
+	* mini-gmp.c (mpz_out_str): Likewise. (spotted by Paul Eggert)
+
 2020-10-06  Niels Möller  <nisse at lysator.liu.se>
 
 	* tests/run-tests: Better support for make check on wine or cygwin.
diff -r 5a9f2dbc4dd6 -r b3ca6f0653b7 mini-gmp/mini-gmp.c
--- a/mini-gmp/mini-gmp.c	Sun Oct 18 08:08:30 2020 +0200
+++ b/mini-gmp/mini-gmp.c	Sun Oct 18 19:28:37 2020 +0200
@@ -32,7 +32,7 @@
 
 /* NOTE: All functions in this file which are not declared in
    mini-gmp.h are internal, and are not intended to be compatible
-   neither with GMP nor with future versions of mini-gmp. */
+   with GMP or with future versions of mini-gmp. */
 
 /* Much of the material copied from GMP files, including: gmp-impl.h,
    longlong.h, mpn/generic/add_n.c, mpn/generic/addmul_1.c,
@@ -4381,6 +4381,8 @@
   size_t len;
 
   str = mpz_get_str (NULL, base, x);
+  if (!str)
+    return 0;
   len = strlen (str);
   len = fwrite (str, 1, len, stream);
   gmp_free (str);
diff -r 5a9f2dbc4dd6 -r b3ca6f0653b7 mini-gmp/mini-mpq.c
--- a/mini-gmp/mini-mpq.c	Sun Oct 18 08:08:30 2020 +0200
+++ b/mini-gmp/mini-mpq.c	Sun Oct 18 19:28:37 2020 +0200
@@ -515,6 +515,8 @@
   void (*gmp_free_func) (void *, size_t);
 
   str = mpq_get_str (NULL, base, x);
+  if (!str)
+    return 0;
   len = strlen (str);
   len = fwrite (str, 1, len, stream);
   mp_get_memory_functions (NULL, NULL, &gmp_free_func);



More information about the gmp-commit mailing list