[packages/foremost] Fix build with -Werror=format-security
megabajt
megabajt at pld-linux.org
Sat Feb 16 11:30:15 CET 2013
commit 254300d74a956d996beedc11204acade527ae3de
Author: Marcin Banasiak <marcin.banasiak at gmail.com>
Date: Sat Feb 16 11:29:42 2013 +0100
Fix build with -Werror=format-security
foremost-format-security.patch | 11 +++++++++++
foremost.spec | 2 ++
2 files changed, 13 insertions(+)
---
diff --git a/foremost.spec b/foremost.spec
index 5a8feef..770bc52 100644
--- a/foremost.spec
+++ b/foremost.spec
@@ -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} \
diff --git a/foremost-format-security.patch b/foremost-format-security.patch
new file mode 100644
index 0000000..97bc63b
--- /dev/null
+++ b/foremost-format-security.patch
@@ -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)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/foremost.git/commitdiff/254300d74a956d996beedc11204acade527ae3de
More information about the pld-cvs-commit
mailing list