blueness    14/11/19 13:40:03

  Added:                fix-format-security.patch
  Log:
  Fix build with -Werror=format-security, bug #520984
  
  (Portage version: 2.2.8-r2/cvs/Linux x86_64, signed Manifest commit with key 
0xF52D4BBA)

Revision  Changes    Path
1.1                  app-benchmarks/spew/files/fix-format-security.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-benchmarks/spew/files/fix-format-security.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-benchmarks/spew/files/fix-format-security.patch?rev=1.1&content-type=text/plain

Index: fix-format-security.patch
===================================================================
diff -Naur spew-1.0.8.orig/src/spew.cpp spew-1.0.8/src/spew.cpp
--- spew-1.0.8.orig/src/spew.cpp        2010-05-14 01:06:18.000000000 -0400
+++ spew-1.0.8/src/spew.cpp     2014-11-19 08:39:31.806338597 -0500
@@ -285,7 +285,7 @@
             PATTERN_LOOKUP[Job::PATTERN_USER_DEFINED],
             PATTERN_LOOKUP[Job::PATTERN_USER_DEFINED],
             PATTERN_LOOKUP[DEFAULT_PATTERN]);
-   fprintf(stdout, outStr);
+   fprintf(stdout, "%s", outStr);
 
    fprintf(stdout, "\nReport bugs to Andrew Patterson 
<[email protected]>.\n");
 }
diff -Naur spew-1.0.8.orig/src/SpewTuiStatisticsWindow.cpp 
spew-1.0.8/src/SpewTuiStatisticsWindow.cpp
--- spew-1.0.8.orig/src/SpewTuiStatisticsWindow.cpp     2008-05-13 
00:47:17.000000000 -0400
+++ spew-1.0.8/src/SpewTuiStatisticsWindow.cpp  2014-11-19 08:39:52.527339540 
-0500
@@ -278,7 +278,7 @@
              "");
    if (mSpewTui->getCurrentIteration() > 0)
    {
-      int len = snprintf(NULL, 0, (char 
*)mTotalRunTime.getElapsedTimeStr().c_str());
+      int len = snprintf(NULL, 0, "%s", (char 
*)mTotalRunTime.getElapsedTimeStr().c_str());
       mvwprintw(mWindow, 
                 RUNTIME_FIELD_STARTY, 
                 RUNTIME_FIELD_STARTX + RUNTIME_FIELD_WIDTH - len,




Reply via email to