]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/command_match.c
lib, zebra: remove uses of strncpy
[mirror_frr.git] / lib / command_match.c
index 8b34d1e3eb907e6848e75ea6af5edbe23d16c61a..9456e1585a9ece96b6dce18447efd5a5ce155e29 100644 (file)
@@ -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;