[silo-llnl] 39/96: security-fix.patch fixes

Alastair McKinstry mckinstry at moszumanska.debian.org
Tue Jul 21 13:09:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch debian/master
in repository silo-llnl.

commit fb00f3d0128da4a72ec9aa5a7758761117bd0386
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Mon Sep 26 14:16:44 2011 +0100

    security-fix.patch fixes
---
 debian/changelog                  |  1 +
 debian/patches/security-fix.patch | 32 ++++++++++++++++++++++++++++++++
 debian/patches/series             |  1 +
 3 files changed, 34 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 97d82bf..8f20919 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ silo-llnl (4.8-10) unstable; urgency=low
 
   * Do not call 'make distclean', its broken without config.status.
     Closes: #642782. 
+  * Two fixes to fprintf() needed to compile with -Werror=format-security
 
  -- Alastair McKinstry <mckinstry at debian.org>  Mon, 26 Sep 2011 13:57:29 +0100
 
diff --git a/debian/patches/security-fix.patch b/debian/patches/security-fix.patch
new file mode 100644
index 0000000..4a0cb55
--- /dev/null
+++ b/debian/patches/security-fix.patch
@@ -0,0 +1,32 @@
+Author: Alastair McKinstry <mckinstry at debian.org>
+Description: Allow code to compile with -Werror=format-security enabled. Relies on the
+  code DBfile_as_string() being safe.
+Last-Updated: 2011-09-25
+Forwarded: no
+
+Index: silo-llnl-4.8/tools/python/pydbfile.cpp
+===================================================================
+--- silo-llnl-4.8.orig/tools/python/pydbfile.cpp	2011-09-26 13:58:24.000000000 +0100
++++ silo-llnl-4.8/tools/python/pydbfile.cpp	2011-09-26 14:09:43.000000000 +0100
+@@ -548,7 +548,7 @@
+ {
+     char str[1000];
+     DBfile_as_string(self, str);
+-    fprintf(fp, str);
++    fprintf(fp, "%s", str);
+     return 0;
+ }
+ 
+Index: silo-llnl-4.8/tools/python/pydbtoc.cpp
+===================================================================
+--- silo-llnl-4.8.orig/tools/python/pydbtoc.cpp	2011-09-26 13:58:24.000000000 +0100
++++ silo-llnl-4.8/tools/python/pydbtoc.cpp	2011-09-26 14:12:12.000000000 +0100
+@@ -178,7 +178,7 @@
+     int len = DBtoc_as_string(self, 0);
+     char *str = new char[len]; 
+     DBtoc_as_string(self, str);
+-    fprintf(fp, str);
++    fprintf(fp, "%s", str);
+     delete [] str;
+     return 0;
+ }
diff --git a/debian/patches/series b/debian/patches/series
index b0ac555..e27c0e6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ test-disable-largefile.patch
 pkgconfig.patch
 version-script.patch
 autoreconf.patch
+security-fix.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/silo-llnl.git



More information about the debian-science-commits mailing list