-
Notifications
You must be signed in to change notification settings - Fork 723
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lowpan-tools: Switch to using github src_uri and fix build with gcc8
Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Armin Kuster <[email protected]>
- Loading branch information
Showing
2 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
...ecipes-support/lowpan-tools/lowpan-tools/0001-coordinator-Fix-strncpy-range-warning.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 <[email protected]> | ||
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 <[email protected]> | ||
--- | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters