[packages/unace] Add patch to fix build with -Werror=format-security

megabajt megabajt at pld-linux.org
Wed Jan 30 15:11:10 CET 2013


commit 6ad1e83380c1144f7edf8e62ab4ae81e2803235a
Author: Marcin Banasiak <marcin.banasiak at gmail.com>
Date:   Wed Jan 30 15:10:25 2013 +0100

    Add patch to fix build with -Werror=format-security

 unace-format-security.patch | 21 +++++++++++++++++++++
 unace.spec                  |  2 ++
 2 files changed, 23 insertions(+)
---
diff --git a/unace.spec b/unace.spec
index e0254d9..5276025 100644
--- a/unace.spec
+++ b/unace.spec
@@ -8,6 +8,7 @@ License:	Freeware
 Group:		Applications/Archiving
 Source0:	%{name}pub.zip
 # Source0-md5:	1a73dda37e4d8d8ef70f27a858e32a55
+Patch0:		%{name}-format-security.patch
 BuildRequires:	unzip
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -24,6 +25,7 @@ przeglądania zawartości archiwów stworzonych przez program ACE.
 %prep
 %setup -q -c -T
 unzip -qa %{SOURCE0}
+%patch0 -p1
 
 %build
 cp -f unix/makefile .
diff --git a/unace-format-security.patch b/unace-format-security.patch
new file mode 100644
index 0000000..64734d0
--- /dev/null
+++ b/unace-format-security.patch
@@ -0,0 +1,21 @@
+diff -urN unace/unace.c unace.new/unace.c
+--- unace/unace.c	1998-07-01 10:29:10.000000000 +0200
++++ unace.new/unace.c	2013-01-30 15:07:54.736449237 +0100
+@@ -262,7 +262,7 @@
+       printf("Authenticity Verification:");   // print the AV
+       sprintf(av_str, "\ncreated on %d.%d.%d by ",
+               ts_day(adat.time_cr), ts_month(adat.time_cr), ts_year(adat.time_cr));
+-      printf(av_str);
++      fputs(av_str, stdout);
+       strncpy(av_str, mhead.AV, mhead.AV_SIZE);
+       av_str[mhead.AV_SIZE] = 0;
+       printf("%s\n\n", av_str);
+@@ -560,7 +560,7 @@
+    INT show_help,
+        arg_cnt = 1;
+ 
+-   printf(version);
++   fputs(version, stdout);
+    show_help=0;
+ 
+    if (argc < 3 || strlen(argv[1]) > 1 || argv[argc-1][0] == '-')
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/unace.git/commitdiff/6ad1e83380c1144f7edf8e62ab4ae81e2803235a



More information about the pld-cvs-commit mailing list