commit:     60abede81b5a84ea9a77e560e942a3ef330ec550
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 26 01:37:23 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Nov 26 01:37:41 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60abede8

app-arch/unzip: Rev bump to fix build with format-security

Package-Manager: Portage-2.3.16, Repoman-2.3.6

 .../unzip/files/unzip-6.0-format-security.patch    | 91 ++++++++++++++++++++++
 ...p-6.0_p21-r1.ebuild => unzip-6.0_p21-r2.ebuild} |  1 +
 2 files changed, 92 insertions(+)

diff --git a/app-arch/unzip/files/unzip-6.0-format-security.patch 
b/app-arch/unzip/files/unzip-6.0-format-security.patch
new file mode 100644
index 00000000000..c61c1359636
--- /dev/null
+++ b/app-arch/unzip/files/unzip-6.0-format-security.patch
@@ -0,0 +1,91 @@
+Fix build with -Werror=format-security
+
+Origin: 
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=master-next&id=f7d80257afcfefdc85b6745328f2d12b957a848b
+Author: Edwin Plauchu <edwin.plauchu.cama...@intel.com>
+
+diff --git a/extract.c b/extract.c
+index 7cd9123..25c5a62 100644
+--- a/extract.c
++++ b/extract.c
+@@ -475,7 +475,7 @@ int extract_or_test_files(__G)    /* return PK-type error 
code */
+                     Info(slide, 0x401, ((char *)slide,
+                       LoadFarString(CentSigMsg), j + blknum*DIR_BLKSIZ + 1));
+                     Info(slide, 0x401, ((char *)slide,
+-                      LoadFarString(ReportMsg)));
++                      "%s",LoadFarString(ReportMsg)));
+                     error_in_archive = PK_BADERR;
+                 }
+                 reached_end = TRUE;     /* ...so no more left to do */
+@@ -754,8 +754,8 @@ int extract_or_test_files(__G)    /* return PK-type error 
code */
+
+ #ifndef SFX
+     if (no_endsig_found) {                      /* just to make sure */
+-        Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
+-        Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg)));
++        Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg)));
++        Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(ReportMsg)));
+         if (!error_in_archive)       /* don't overwrite stronger error */
+             error_in_archive = PK_WARN;
+     }
+diff --git a/list.c b/list.c
+index 15e0011..0b484f6 100644
+--- a/list.c
++++ b/list.c
+@@ -181,7 +181,7 @@ int list_files(__G)    /* return PK-type error code */
+                 Info(slide, 0x401,
+                      ((char *)slide, LoadFarString(CentSigMsg), j));
+                 Info(slide, 0x401,
+-                     ((char *)slide, LoadFarString(ReportMsg)));
++                     ((char *)slide, "%s", LoadFarString(ReportMsg)));
+                 return PK_BADERR;   /* sig not found */
+             }
+         }
+@@ -507,7 +507,7 @@ int list_files(__G)    /* return PK-type error code */
+             && (!G.ecrec.is_zip64_archive)
+             && (memcmp(G.sig, end_central_sig, 4) != 0)
+            ) {          /* just to make sure again */
+-            Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
++            Info(slide, 0x401, ((char *)slide, "%s", 
LoadFarString(EndSigMsg)));
+             error_in_archive = PK_WARN;   /* didn't find sig */
+         }
+
+@@ -591,7 +591,7 @@ int get_time_stamp(__G__ last_modtime, nmember)  /* return 
PK-type error code */
+                 Info(slide, 0x401,
+                      ((char *)slide, LoadFarString(CentSigMsg), j));
+                 Info(slide, 0x401,
+-                     ((char *)slide, LoadFarString(ReportMsg)));
++                     ((char *)slide, "%s", LoadFarString(ReportMsg)));
+                 return PK_BADERR;   /* sig not found */
+             }
+         }
+@@ -674,7 +674,7 @@ int get_time_stamp(__G__ last_modtime, nmember)  /* return 
PK-type error code */
+   
---------------------------------------------------------------------------*/
+ 
+     if (memcmp(G.sig, end_central_sig, 4)) {    /* just to make sure again */
+-        Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
++        Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg)));
+         error_in_archive = PK_WARN;
+     }
+     if (*nmember == 0L && error_in_archive <= PK_WARN)
+diff --git a/zipinfo.c b/zipinfo.c
+index 0ac75b3..1e7fa82 100644
+--- a/zipinfo.c
++++ b/zipinfo.c
+@@ -833,7 +833,7 @@ int zipinfo(__G)   /* return PK-type error code */
+                 Info(slide, 0x401,
+                      ((char *)slide, LoadFarString(CentSigMsg), j));
+                 Info(slide, 0x401,
+-                     ((char *)slide, LoadFarString(ReportMsg)));
++                     ((char *)slide, "%s", LoadFarString(ReportMsg)));
+                 error_in_archive = PK_BADERR;   /* sig not found */
+                 break;
+             }
+@@ -1022,7 +1022,7 @@ int zipinfo(__G)   /* return PK-type error code */
+             && (!G.ecrec.is_zip64_archive)
+             && (memcmp(G.sig, end_central_sig, 4) != 0)
+            ) {          /* just to make sure again */
+-            Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
++            Info(slide, 0x401, ((char *)slide, "%s", 
LoadFarString(EndSigMsg)));
+             error_in_archive = PK_WARN;   /* didn't find sig */
+         }
+ 

diff --git a/app-arch/unzip/unzip-6.0_p21-r1.ebuild 
b/app-arch/unzip/unzip-6.0_p21-r2.ebuild
similarity index 97%
rename from app-arch/unzip/unzip-6.0_p21-r1.ebuild
rename to app-arch/unzip/unzip-6.0_p21-r2.ebuild
index 59771d0d1a7..bdc9d03e278 100644
--- a/app-arch/unzip/unzip-6.0_p21-r1.ebuild
+++ b/app-arch/unzip/unzip-6.0_p21-r2.ebuild
@@ -31,6 +31,7 @@ src_prepare() {
        eapply "${deb}"/*.patch
 
        eapply "${FILESDIR}"/${PN}-6.0-no-exec-stack.patch
+       eapply "${FILESDIR}"/${PN}-6.0-format-security.patch
        use natspec && eapply "${FILESDIR}/${PN}-6.0-natspec.patch" #275244
        sed -i -r \
                -e '/^CFLAGS/d' \

Reply via email to