summaryrefslogtreecommitdiff
path: root/lib/command_match.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-05-29 23:55:17 -0300
committerGitHub <noreply@github.com>2019-05-29 23:55:17 -0300
commit0ad79902fc5f4219feef1fec2ee7b5dfd3f34f98 (patch)
tree603415acae0525e1e09f1a0a2a0c362766783ab3 /lib/command_match.c
parentfc37d4fe0d22aafcaac0c71cc41e426ef7b8a71d (diff)
parent67c726a10d90b9edc02e99e5a9064d14f9920309 (diff)
Merge pull request #4267 from qlyoung/fix-misc-compile-warnings
Fix misc compile warnings, remove strcpy & strcat
Diffstat (limited to 'lib/command_match.c')
-rw-r--r--lib/command_match.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/command_match.c b/lib/command_match.c
index 8b34d1e3eb..9456e1585a 100644
--- a/lib/command_match.c
+++ b/lib/command_match.c
@@ -723,7 +723,7 @@ static enum match_type match_ipv4(const char *str)
if (str - sp > 3)
return no_match;
- strncpy(buf, sp, str - sp);
+ memcpy(buf, sp, str - sp);
if (atoi(buf) > 255)
return no_match;
@@ -774,7 +774,7 @@ static enum match_type match_ipv4_prefix(const char *str)
if (str - sp > 3)
return no_match;
- strncpy(buf, sp, str - sp);
+ memcpy(buf, sp, str - sp);
if (atoi(buf) > 255)
return no_match;