summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Banasiak2013-01-30 14:10:25 (GMT)
committerMarcin Banasiak2013-01-30 14:10:25 (GMT)
commit6ad1e83380c1144f7edf8e62ab4ae81e2803235a (patch)
tree16bab07f187bde98a41d8a284ab7a6f4cf1f4ef3
parent4aa1e484dcf6877e31c309b2fb39ef28e192b7ac (diff)
downloadunace-6ad1e83380c1144f7edf8e62ab4ae81e2803235a.zip
unace-6ad1e83380c1144f7edf8e62ab4ae81e2803235a.tar.gz
Add patch to fix build with -Werror=format-security
-rw-r--r--unace-format-security.patch21
-rw-r--r--unace.spec2
2 files changed, 23 insertions, 0 deletions
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] == '-')
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 .