File: 31_fedora_plotutils-werror-format-security.patch

package info (click to toggle)
plotutils 2.6-15
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,040 kB
  • sloc: ansic: 68,670; sh: 20,086; cpp: 12,382; yacc: 2,588; makefile: 838; lex: 137
file content (18 lines) | stat: -rw-r--r-- 660 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Fix build error with -Werror=format-security.
Forwarded: https://lists.gnu.org/archive/html/bug-plotutils/2016-01/msg00000.html 
Author: Stanislav Ochotnicky <sochotnicky@redhat.com>
Origin: http://pkgs.fedoraproject.org/cgit/plotutils.git

diff --git a/pic2plot/gram.yy b/pic2plot/gram.yy
index d11320b..1bcce46 100644
--- a/pic2plot/gram.yy
+++ b/pic2plot/gram.yy
@@ -1833,7 +1833,7 @@ do_sprintf(const char *form, const double *v, int nv)
 	    {
 	      one_format += *form++;
 	      one_format += '\0';
-	      sprintf(sprintf_buf, one_format.contents());
+	      sprintf(sprintf_buf, "%s", one_format.contents());
 	    }
 	  else 
 	    {