From: Khem Raj <raj.khem@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [meta-networking][PATCH 3/7] ruli: FIx build with hardening flags
Date: Sun, 25 Jun 2017 22:34:42 -0700 [thread overview]
Message-ID: <20170626053446.37959-3-raj.khem@gmail.com> (raw)
In-Reply-To: <20170626053446.37959-1-raj.khem@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...src-ruli_addr.c-Add-missing-format-string.patch | 35 ++++++++++++++++++++++
meta-networking/recipes-support/ruli/ruli_0.36.bb | 1 +
2 files changed, 36 insertions(+)
create mode 100644 meta-networking/recipes-support/ruli/files/0001-src-ruli_addr.c-Add-missing-format-string.patch
diff --git a/meta-networking/recipes-support/ruli/files/0001-src-ruli_addr.c-Add-missing-format-string.patch b/meta-networking/recipes-support/ruli/files/0001-src-ruli_addr.c-Add-missing-format-string.patch
new file mode 100644
index 000000000..9044415ff
--- /dev/null
+++ b/meta-networking/recipes-support/ruli/files/0001-src-ruli_addr.c-Add-missing-format-string.patch
@@ -0,0 +1,35 @@
+From d3fb471f53712e710fb5777b1b0851c46b7be64c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 25 Jun 2017 01:23:03 -0700
+Subject: [PATCH] src/ruli_addr.c: Add missing format string
+
+fixes
+
+| ruli_addr.c: In function 'ruli_in_snprint':
+| ruli_addr.c:491:5: error: format not a string literal and no format arguments [-Werror=format-security]
+| return snprintf(buf, size, inet_ntoa(addr->ipv4));
+| ^~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/ruli_addr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ruli_addr.c b/src/ruli_addr.c
+index f1eabae..5f1fd4f 100644
+--- a/src/ruli_addr.c
++++ b/src/ruli_addr.c
+@@ -488,7 +488,7 @@ int ruli_in_snprint(char *buf, size_t size, const _ruli_addr *addr, int family)
+ {
+ switch (family) {
+ case PF_INET:
+- return snprintf(buf, size, inet_ntoa(addr->ipv4));
++ return snprintf(buf, size, "%s", inet_ntoa(addr->ipv4));
+
+ case PF_INET6:
+ return ruli_inet6_snprint(buf, size, &addr->ipv6);
+--
+2.13.1
+
diff --git a/meta-networking/recipes-support/ruli/ruli_0.36.bb b/meta-networking/recipes-support/ruli/ruli_0.36.bb
index b41313090..885796d2a 100644
--- a/meta-networking/recipes-support/ruli/ruli_0.36.bb
+++ b/meta-networking/recipes-support/ruli/ruli_0.36.bb
@@ -10,6 +10,7 @@ DEPENDS = "liboop"
SRC_URI = "http://download.savannah.gnu.org/releases/ruli/ruli_${PV}.orig.tar.gz \
file://Makefile.patch \
file://0001-Fix-build-with-format-string-checks.patch \
+ file://0001-src-ruli_addr.c-Add-missing-format-string.patch \
"
SRC_URI[md5sum] = "e73fbfdeadddb68a703a70cea5271468"
--
2.13.1
next prev parent reply other threads:[~2017-06-26 5:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-26 5:34 [meta-oe][PATCH 1/7] live555: Define XLOCALE_NOT_USED for glibc too Khem Raj
2017-06-26 5:34 ` [meta-networking][PATCH 2/7] squid: Fix build with hardening Khem Raj
2017-06-26 5:34 ` Khem Raj [this message]
2017-06-26 5:34 ` [meta-oe][PATCH 4/7] gpm: Use sigemptyset() API for glibc as well Khem Raj
2017-06-26 5:34 ` [meta-oe][PATCH 5/7] hwloc: Inherit pkgconfig Khem Raj
2017-06-26 14:22 ` Khem Raj
2017-06-26 14:24 ` Martin Jansa
2017-06-26 5:34 ` [meta-oe][PATCH 6/7] ssiapi: Fix build with hardening flags Khem Raj
2017-06-26 5:34 ` [meta-oe][PATCH 7/7] crash: Upgrade to 7.1.9 Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170626053446.37959-3-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox