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

mercurial at gmplib.org mercurial at gmplib.org
Tue Oct 29 16:48:15 CET 2013


details:   /var/hg/gmp/rev/bab6104915dc
changeset: 16081:bab6104915dc
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Tue Oct 29 16:47:59 2013 +0100
description:
(__gmp_doprnt): Use memcpy instead of strcpy.

details:   /var/hg/gmp/rev/528a190bd795
changeset: 16082:528a190bd795
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Tue Oct 29 16:48:09 2013 +0100
description:
ChangeLog

diffstat:

 ChangeLog       |  4 ++++
 printf/doprnt.c |  2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r 04cd0d8d3f36 -r 528a190bd795 ChangeLog
--- a/ChangeLog	Thu Oct 24 23:36:38 2013 +0200
+++ b/ChangeLog	Tue Oct 29 16:48:09 2013 +0100
@@ -1,3 +1,7 @@
+2013-10-29  Torbjorn Granlund  <tege at gmplib.org>
+
+	* printf/doprnt.c (__gmp_doprnt): Use memcpy instead of strcpy.
+
 2013-10-24  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/generic/div_qr_1u_pi2.c: New file.
diff -r 04cd0d8d3f36 -r 528a190bd795 printf/doprnt.c
--- a/printf/doprnt.c	Thu Oct 24 23:36:38 2013 +0200
+++ b/printf/doprnt.c	Tue Oct 29 16:48:09 2013 +0100
@@ -182,7 +182,7 @@
 #endif
   alloc_fmt = __GMP_ALLOCATE_FUNC_TYPE (alloc_fmt_size, char);
   fmt = alloc_fmt;
-  strcpy (fmt, orig_fmt);
+  memcpy (fmt, orig_fmt, alloc_fmt_size);
 
   /* last_fmt and last_ap are just after the last output, and hence where
      the next output will begin, when that's done */


More information about the gmp-commit mailing list