Skip to content

Commit

Permalink
lowpan-tools: Switch to using github src_uri and fix build with gcc8
Browse files Browse the repository at this point in the history
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
  • Loading branch information
kraj authored and akuster committed Apr 9, 2018
1 parent ae1d381 commit afad857
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From f017353b8f3170ce79e7addc127056c0142f087b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 1 Apr 2018 14:31:05 -0700
Subject: [PATCH] coordinator: Fix strncpy range warning

Fixes
error: 'strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/coordinator.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/coordinator.c b/src/coordinator.c
index c139aae..ca49418 100644
--- a/src/coordinator.c
+++ b/src/coordinator.c
@@ -296,7 +296,8 @@ int main(int argc, char **argv)
if(!lease_file)
lease_file = LEASE_FILE;

- strncpy(pname, argv[0], PATH_MAX);
+ strncpy(pname, argv[0], PATH_MAX - 1);
+ pname[PATH_MAX - 1] = '\0';

pid_file = getenv("PID_FILE");
if (!pid_file)
--
2.16.3

Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
DEPENDS = "flex-native bison-native libnl python"

PV = "0.3.1+git${SRCPV}"
SRC_URI = "git://git.code.sf.net/p/linux-zigbee/linux-zigbee \
SRC_URI = "git://github.com/linux-wpan/lowpan-tools \
file://no-help2man.patch \
file://0001-Fix-build-errors-with-clang.patch \
file://0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch \
file://0001-src-iz.c-Undef-dprintf-before-redefining.patch \
file://0001-Remove-newline-from-format-line.patch \
file://0001-coordinator-Fix-strncpy-range-warning.patch \
"
SRCREV = "38f42dbfce9e13629263db3bd3b81f14c69bb733"
SRCREV = "1c2d8674cc6f4b1166a066e8822e295c105ae7a2"

S = "${WORKDIR}/git"

Expand Down

0 comments on commit afad857

Please sign in to comment.