[oe-commits] [meta-openembedded] 29/36: log4c: Backport patch to fix security format errors with clang

git at git.openembedded.org git at git.openembedded.org
Tue Mar 7 12:33:57 UTC 2017


This is an automated email from the git hooks/post-receive script.

martin_jansa pushed a commit to branch master-next
in repository meta-openembedded.

commit 04a94497e5ea0aa0a3b0d6cfd441c9ab8a6e59c2
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Mon Mar 6 23:13:45 2017 -0800

    log4c: Backport patch to fix security format errors with clang
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 ...-properly-in-the-example-format-security-.patch | 26 ++++++++++++++++++++++
 meta-oe/recipes-support/log4c/log4c_1.2.4.bb       |  4 +++-
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/log4c/log4c/0001-Use-the-API-properly-in-the-example-format-security-.patch b/meta-oe/recipes-support/log4c/log4c/0001-Use-the-API-properly-in-the-example-format-security-.patch
new file mode 100644
index 0000000..9ff9d70
--- /dev/null
+++ b/meta-oe/recipes-support/log4c/log4c/0001-Use-the-API-properly-in-the-example-format-security-.patch
@@ -0,0 +1,26 @@
+From 97f0b7b25474fab25f5757f7c50a77e20be5d05b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= <valtri at civ.zcu.cz>
+Date: Mon, 7 Sep 2015 15:00:48 +0200
+Subject: [PATCH] Use the API properly in the example (format security error
+ fixed).
+
+---
+ examples/helloworld1/mylog.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/examples/helloworld1/mylog.h b/examples/helloworld1/mylog.h
+index 280f3dc..57e5369 100644
+--- a/examples/helloworld1/mylog.h
++++ b/examples/helloworld1/mylog.h
+@@ -39,7 +39,7 @@ static LOG4C_INLINE int mylog_fini(){
+ 
+ static LOG4C_INLINE void mylog_msg(char *catName,int a_priority, char *msg){
+ #ifndef WITHOUT_LOG4C
+-	log4c_category_log(log4c_category_get(catName), a_priority, msg);
++	log4c_category_log(log4c_category_get(catName), a_priority, "%s", msg);
+ #else
+ 	printf(msg);
+ #endif
+-- 
+2.12.0
+
diff --git a/meta-oe/recipes-support/log4c/log4c_1.2.4.bb b/meta-oe/recipes-support/log4c/log4c_1.2.4.bb
index a028f2b..ef7ad84 100644
--- a/meta-oe/recipes-support/log4c/log4c_1.2.4.bb
+++ b/meta-oe/recipes-support/log4c/log4c_1.2.4.bb
@@ -4,7 +4,9 @@ LICENSE = "LGPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
-           file://fix_configure_with-expat.patch"
+           file://fix_configure_with-expat.patch \
+           file://0001-Use-the-API-properly-in-the-example-format-security-.patch \
+          "
 
 SRC_URI[md5sum] = "0d94919136e1d16b68427562e74cb3dd"
 SRC_URI[sha256sum] = "5991020192f52cc40fa852fbf6bbf5bd5db5d5d00aa9905c67f6f0eadeed48ea"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list