Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/unzip/files/, app-arch/unzip/
Date: Sun, 26 Nov 2017 01:37:50
Message-Id: 1511660261.60abede81b5a84ea9a77e560e942a3ef330ec550.whissi@gentoo
1 commit: 60abede81b5a84ea9a77e560e942a3ef330ec550
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 26 01:37:23 2017 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 26 01:37:41 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60abede8
7
8 app-arch/unzip: Rev bump to fix build with format-security
9
10 Package-Manager: Portage-2.3.16, Repoman-2.3.6
11
12 .../unzip/files/unzip-6.0-format-security.patch | 91 ++++++++++++++++++++++
13 ...p-6.0_p21-r1.ebuild => unzip-6.0_p21-r2.ebuild} | 1 +
14 2 files changed, 92 insertions(+)
15
16 diff --git a/app-arch/unzip/files/unzip-6.0-format-security.patch b/app-arch/unzip/files/unzip-6.0-format-security.patch
17 new file mode 100644
18 index 00000000000..c61c1359636
19 --- /dev/null
20 +++ b/app-arch/unzip/files/unzip-6.0-format-security.patch
21 @@ -0,0 +1,91 @@
22 +Fix build with -Werror=format-security
23 +
24 +Origin: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=master-next&id=f7d80257afcfefdc85b6745328f2d12b957a848b
25 +Author: Edwin Plauchu <edwin.plauchu.camacho@×××××.com>
26 +
27 +diff --git a/extract.c b/extract.c
28 +index 7cd9123..25c5a62 100644
29 +--- a/extract.c
30 ++++ b/extract.c
31 +@@ -475,7 +475,7 @@ int extract_or_test_files(__G) /* return PK-type error code */
32 + Info(slide, 0x401, ((char *)slide,
33 + LoadFarString(CentSigMsg), j + blknum*DIR_BLKSIZ + 1));
34 + Info(slide, 0x401, ((char *)slide,
35 +- LoadFarString(ReportMsg)));
36 ++ "%s",LoadFarString(ReportMsg)));
37 + error_in_archive = PK_BADERR;
38 + }
39 + reached_end = TRUE; /* ...so no more left to do */
40 +@@ -754,8 +754,8 @@ int extract_or_test_files(__G) /* return PK-type error code */
41 +
42 + #ifndef SFX
43 + if (no_endsig_found) { /* just to make sure */
44 +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
45 +- Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg)));
46 ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg)));
47 ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(ReportMsg)));
48 + if (!error_in_archive) /* don't overwrite stronger error */
49 + error_in_archive = PK_WARN;
50 + }
51 +diff --git a/list.c b/list.c
52 +index 15e0011..0b484f6 100644
53 +--- a/list.c
54 ++++ b/list.c
55 +@@ -181,7 +181,7 @@ int list_files(__G) /* return PK-type error code */
56 + Info(slide, 0x401,
57 + ((char *)slide, LoadFarString(CentSigMsg), j));
58 + Info(slide, 0x401,
59 +- ((char *)slide, LoadFarString(ReportMsg)));
60 ++ ((char *)slide, "%s", LoadFarString(ReportMsg)));
61 + return PK_BADERR; /* sig not found */
62 + }
63 + }
64 +@@ -507,7 +507,7 @@ int list_files(__G) /* return PK-type error code */
65 + && (!G.ecrec.is_zip64_archive)
66 + && (memcmp(G.sig, end_central_sig, 4) != 0)
67 + ) { /* just to make sure again */
68 +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
69 ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg)));
70 + error_in_archive = PK_WARN; /* didn't find sig */
71 + }
72 +
73 +@@ -591,7 +591,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */
74 + Info(slide, 0x401,
75 + ((char *)slide, LoadFarString(CentSigMsg), j));
76 + Info(slide, 0x401,
77 +- ((char *)slide, LoadFarString(ReportMsg)));
78 ++ ((char *)slide, "%s", LoadFarString(ReportMsg)));
79 + return PK_BADERR; /* sig not found */
80 + }
81 + }
82 +@@ -674,7 +674,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */
83 + ---------------------------------------------------------------------------*/
84 +
85 + if (memcmp(G.sig, end_central_sig, 4)) { /* just to make sure again */
86 +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
87 ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg)));
88 + error_in_archive = PK_WARN;
89 + }
90 + if (*nmember == 0L && error_in_archive <= PK_WARN)
91 +diff --git a/zipinfo.c b/zipinfo.c
92 +index 0ac75b3..1e7fa82 100644
93 +--- a/zipinfo.c
94 ++++ b/zipinfo.c
95 +@@ -833,7 +833,7 @@ int zipinfo(__G) /* return PK-type error code */
96 + Info(slide, 0x401,
97 + ((char *)slide, LoadFarString(CentSigMsg), j));
98 + Info(slide, 0x401,
99 +- ((char *)slide, LoadFarString(ReportMsg)));
100 ++ ((char *)slide, "%s", LoadFarString(ReportMsg)));
101 + error_in_archive = PK_BADERR; /* sig not found */
102 + break;
103 + }
104 +@@ -1022,7 +1022,7 @@ int zipinfo(__G) /* return PK-type error code */
105 + && (!G.ecrec.is_zip64_archive)
106 + && (memcmp(G.sig, end_central_sig, 4) != 0)
107 + ) { /* just to make sure again */
108 +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
109 ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg)));
110 + error_in_archive = PK_WARN; /* didn't find sig */
111 + }
112 +
113
114 diff --git a/app-arch/unzip/unzip-6.0_p21-r1.ebuild b/app-arch/unzip/unzip-6.0_p21-r2.ebuild
115 similarity index 97%
116 rename from app-arch/unzip/unzip-6.0_p21-r1.ebuild
117 rename to app-arch/unzip/unzip-6.0_p21-r2.ebuild
118 index 59771d0d1a7..bdc9d03e278 100644
119 --- a/app-arch/unzip/unzip-6.0_p21-r1.ebuild
120 +++ b/app-arch/unzip/unzip-6.0_p21-r2.ebuild
121 @@ -31,6 +31,7 @@ src_prepare() {
122 eapply "${deb}"/*.patch
123
124 eapply "${FILESDIR}"/${PN}-6.0-no-exec-stack.patch
125 + eapply "${FILESDIR}"/${PN}-6.0-format-security.patch
126 use natspec && eapply "${FILESDIR}/${PN}-6.0-natspec.patch" #275244
127 sed -i -r \
128 -e '/^CFLAGS/d' \