]> git.pld-linux.org Git - packages/foremost.git/commitdiff
Fix build with -Werror=format-security master
authorMarcin Banasiak <marcin.banasiak@gmail.com>
Sat, 16 Feb 2013 10:29:42 +0000 (11:29 +0100)
committerMarcin Banasiak <marcin.banasiak@gmail.com>
Sat, 16 Feb 2013 10:29:42 +0000 (11:29 +0100)
foremost-format-security.patch [new file with mode: 0644]
foremost.spec

diff --git a/foremost-format-security.patch b/foremost-format-security.patch
new file mode 100644 (file)
index 0000000..97bc63b
--- /dev/null
@@ -0,0 +1,11 @@
+--- foremost-1.5.7/extract.c.formatsec 2013-02-16 11:26:37.783832687 +0100
++++ foremost-1.5.7/extract.c   2013-02-16 11:27:31.220209864 +0100
+@@ -2145,7 +2145,7 @@ unsigned char *extract_exe(f_state *s, u
+                       ret_time->tm_sec);
+       chop(ascii_time);
+-      sprintf(comment, ascii_time);
++      sprintf(comment, "%s", ascii_time);
+       strcat(needle->comment, comment);
+       exe_char = htos(&foundat[22], FOREMOST_LITTLE_ENDIAN);
+       if (exe_char & 0x2000)
index 5a8feef999c942a961257e4bad747bbc16acec96..770bc52baa2b2e1c0a8558aab3ab7380f2106fb2 100644 (file)
@@ -8,6 +8,7 @@ Group:          Applications/System
 Source0:       http://foremost.sourceforge.net/pkg/%{name}-%{version}.tar.gz
 # Source0-md5: 860119c49665c2a3fb2b0b1d3dbad02a
 Patch0:                %{name}-sysconfdir.patch
+Patch1:                %{name}-format-security.patch
 URL:           http://foremost.sourceforge.net/
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -34,6 +35,7 @@ odzyskiwania danych.
 %setup -q
 sed -i -e 's,\r$,,' main.h
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__make} \
This page took 0.131484 seconds and 4 git commands to generate.