summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-06-27 19:08:13 -0700
committerArmin Kuster <akuster808@gmail.com>2017-09-13 17:24:22 -0700
commit365493fc3362084b7d97dc41c2e599d32ceb490e (patch)
treee8b4159867ec67304dc4375aff68131c1999f09d
parentfee1dc0c97bb1f510f5180da846f90a0829b56eb (diff)
downloadmeta-openembedded-365493fc3362084b7d97dc41c2e599d32ceb490e.tar.gz
netkit-rpc: Fix build with hardening flags
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> (cherry picked from commit e244c28893e4e2e635a14f729616d1a975b21ab9) Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/0001-rpcgen-Fix-printf-formats.patch51
-rw-r--r--meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb4
2 files changed, 54 insertions, 1 deletions
diff --git a/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/0001-rpcgen-Fix-printf-formats.patch b/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/0001-rpcgen-Fix-printf-formats.patch
new file mode 100644
index 000000000..8bd77d2e4
--- /dev/null
+++ b/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/0001-rpcgen-Fix-printf-formats.patch
@@ -0,0 +1,51 @@
1From 439e3e35f7fcbff1abb782de4b19b31e43ae3449 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 27 Jun 2017 09:59:19 -0700
4Subject: [PATCH] rpcgen: Fix printf formats
5
6Fixes build with hardening flags
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 rpcgen/rpc_hout.c | 2 +-
11 rpcgen/rpc_tblout.c | 4 ++--
12 2 files changed, 3 insertions(+), 3 deletions(-)
13
14diff --git a/rpcgen/rpc_hout.c b/rpcgen/rpc_hout.c
15index 0ef52df..09a7b57 100644
16--- a/rpcgen/rpc_hout.c
17+++ b/rpcgen/rpc_hout.c
18@@ -474,7 +474,7 @@ pdeclaration(const char *name, declaration *dec, int tab,
19 break;
20 }
21 }
22- f_print(fout, separator );
23+ f_print(fout, "%s", separator );
24 }
25
26 static int
27diff --git a/rpcgen/rpc_tblout.c b/rpcgen/rpc_tblout.c
28index d64bfde..fd62a52 100644
29--- a/rpcgen/rpc_tblout.c
30+++ b/rpcgen/rpc_tblout.c
31@@ -99,7 +99,7 @@ write_table(const definition *def)
32 }
33 else {
34 expected = 1;
35- f_print(fout, null_entry);
36+ f_print(fout, "%s", null_entry);
37 }
38 for (proc = vp->procs; proc != NULL; proc = proc->next) {
39 current = atoi(proc->proc_num);
40@@ -139,7 +139,7 @@ write_table(const definition *def)
41 }
42
43 /* print the table trailer */
44- f_print(fout, tbl_end);
45+ f_print(fout, "%s", tbl_end);
46 f_print(fout, tbl_nproc, progvers, progvers, progvers);
47 }
48 }
49--
502.13.2
51
diff --git a/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb b/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb
index abc9d88cb..75ec07cfe 100644
--- a/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb
+++ b/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb
@@ -5,7 +5,9 @@ LICENSE = "SPL-1.0"
5LIC_FILES_CHKSUM = "file://rpcinfo/rpcinfo.c;beginline=2;endline=3;md5=3e6339e3ce266e1122c5ba293e04bc89" 5LIC_FILES_CHKSUM = "file://rpcinfo/rpcinfo.c;beginline=2;endline=3;md5=3e6339e3ce266e1122c5ba293e04bc89"
6 6
7SRC_URI = "http://sources.openembedded.org/${BPN}-${PV}.tar.gz \ 7SRC_URI = "http://sources.openembedded.org/${BPN}-${PV}.tar.gz \
8 file://gcc4.patch" 8 file://gcc4.patch \
9 file://0001-rpcgen-Fix-printf-formats.patch \
10 "
9SRC_URI[md5sum] = "67212720482ea1aea9182a98653a9642" 11SRC_URI[md5sum] = "67212720482ea1aea9182a98653a9642"
10SRC_URI[sha256sum] = "421d63b414162237a72867061f1bd3e3752a0d962cd5d30b5e933ddad8a14d3b" 12SRC_URI[sha256sum] = "421d63b414162237a72867061f1bd3e3752a0d962cd5d30b5e933ddad8a14d3b"
11 13