summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch30
-rw-r--r--meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb5
2 files changed, 33 insertions, 2 deletions
diff --git a/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch b/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch
new file mode 100644
index 0000000000..493832bb84
--- /dev/null
+++ b/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch
@@ -0,0 +1,30 @@
1From f017353b8f3170ce79e7addc127056c0142f087b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 1 Apr 2018 14:31:05 -0700
4Subject: [PATCH] coordinator: Fix strncpy range warning
5
6Fixes
7error: 'strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation]
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 src/coordinator.c | 5 +++--
12 1 file changed, 3 insertions(+), 2 deletions(-)
13
14diff --git a/src/coordinator.c b/src/coordinator.c
15index c139aae..ca49418 100644
16--- a/src/coordinator.c
17+++ b/src/coordinator.c
18@@ -296,7 +296,8 @@ int main(int argc, char **argv)
19 if(!lease_file)
20 lease_file = LEASE_FILE;
21
22- strncpy(pname, argv[0], PATH_MAX);
23+ strncpy(pname, argv[0], PATH_MAX - 1);
24+ pname[PATH_MAX - 1] = '\0';
25
26 pid_file = getenv("PID_FILE");
27 if (!pid_file)
28--
292.16.3
30
diff --git a/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb b/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
index be73f8ae4b..d0fe59c983 100644
--- a/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
+++ b/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
@@ -8,14 +8,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
8DEPENDS = "flex-native bison-native libnl python" 8DEPENDS = "flex-native bison-native libnl python"
9 9
10PV = "0.3.1+git${SRCPV}" 10PV = "0.3.1+git${SRCPV}"
11SRC_URI = "git://git.code.sf.net/p/linux-zigbee/linux-zigbee \ 11SRC_URI = "git://github.com/linux-wpan/lowpan-tools \
12 file://no-help2man.patch \ 12 file://no-help2man.patch \
13 file://0001-Fix-build-errors-with-clang.patch \ 13 file://0001-Fix-build-errors-with-clang.patch \
14 file://0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch \ 14 file://0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch \
15 file://0001-src-iz.c-Undef-dprintf-before-redefining.patch \ 15 file://0001-src-iz.c-Undef-dprintf-before-redefining.patch \
16 file://0001-Remove-newline-from-format-line.patch \ 16 file://0001-Remove-newline-from-format-line.patch \
17 file://0001-coordinator-Fix-strncpy-range-warning.patch \
17 " 18 "
18SRCREV = "38f42dbfce9e13629263db3bd3b81f14c69bb733" 19SRCREV = "1c2d8674cc6f4b1166a066e8822e295c105ae7a2"
19 20
20S = "${WORKDIR}/git" 21S = "${WORKDIR}/git"
21 22