Skip to contentSkip to conversation

zip: fix security issues

PATCH In review Edwin Plauchu 2 participants 2 messages May 17, 2016 – May 18, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 zip: fix security issues

From: Edwin Plauchu <[email protected]>

This patch avoids zip recipe fails to compile with compiler flags which elevate common string formatting issues into an error (-Wformat -Wformat-security -Werror=format-security).

[YOCTO #9552]

---
 meta/conf/distro/include/security_flags.inc        |  1 -
 .../zip/zip-3.0/fix-security-format.patch          | 42 ++++++++++++++++++++++
 meta/recipes-extended/zip/zip.inc                  |  3 +-
 3 files changed, 44 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-extended/zip/zip-3.0/fix-security-format.patch
meta/conf/distro/include/security_flags.inc +0 -1
index 7a91cec..bb1a398 100644
@@ -107,7 +107,6 @@ SECURITY_STRINGFORMAT_pn-makedevs = ""
 SECURITY_STRINGFORMAT_pn-oh-puzzles = ""
 SECURITY_STRINGFORMAT_pn-stat = ""
 SECURITY_STRINGFORMAT_pn-unzip = ""
-SECURITY_STRINGFORMAT_pn-zip = ""
 
 TARGET_CFLAGS_append_class-target = " ${SECURITY_CFLAGS}"
 TARGET_LDFLAGS_append_class-target = " ${SECURITY_LDFLAGS}"
meta/recipes-extended/zip/zip-3.0/fix-security-format.patch new file +42 -0

42 lines not on this page · raw message

meta/recipes-extended/zip/zip.inc +2 -1
index 6221c5e..21985a4 100644
@@ -5,7 +5,8 @@ SECTION = "console/utils"
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=04d43c5d70b496c032308106e26ae17d"
 
-SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz"
+SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz \
+            file://fix-security-format.patch"
 
 EXTRA_OEMAKE = "'CC=${CC}' 'BIND=${CC}' 'AS=${CC} -c' 'CPP=${CPP}' \
 		'CFLAGS=-I. -DUNIX ${CFLAGS}' 'INSTALL=install' \
Signature · 1 line
1.9.1
#1 lore raw
Quoted 5 lines · Edwin Plauchu

From: Edwin Plauchu <[email protected]>

This patch avoids zip recipe fails to compile with compiler flags which elevate common string formatting issues into an error (-Wformat -Wformat-security -Werror=format-security).

In future please wrap the commit log as above and also, when sending a series of patches like this, please don't allow them all to conflict.

In this case I could edit the patches by hand to make them apply as a series but I shouldn't need to do that, it should be a series of 3, with each one applying on top of the previous one.

The patches are in master-next and much improved over the original versions, thanks.

Cheers,

Richard