summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_ext.c
diff options
context:
space:
mode:
authorpaco <paco@voltanet.io>2018-06-13 17:24:51 +0200
committerpaco <paco@voltanet.io>2018-06-14 16:59:31 +0200
commite4407ea6d01777455b1cf0dbdee57ff70e2c3e3c (patch)
tree9c0230ceac3ef0b4de299c343fa86091dfe63ee1 /ospfd/ospf_ext.c
parentMerge pull request #2421 from pacovn/Coverity_1399232_Logically_dead_code (diff)
downloadfrr-e4407ea6d01777455b1cf0dbdee57ff70e2c3e3c.tar.xz
frr-e4407ea6d01777455b1cf0dbdee57ff70e2c3e3c.zip
ospfd: buffer termination (Coverity 1464993)
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'ospfd/ospf_ext.c')
-rw-r--r--ospfd/ospf_ext.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ospfd/ospf_ext.c b/ospfd/ospf_ext.c
index ac5df3eb4..331cba44a 100644
--- a/ospfd/ospf_ext.c
+++ b/ospfd/ospf_ext.c
@@ -1125,7 +1125,7 @@ static int ospf_ext_pref_lsa_originate1(struct ospf_area *area,
if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) {
char area_id[INET_ADDRSTRLEN];
- strncpy(area_id, inet_ntoa(area->area_id), INET_ADDRSTRLEN);
+ inet_ntop(AF_INET, &area->area_id, area_id, sizeof(area_id));
zlog_debug(
"EXT (%s): LSA[Type%u:%s]: Originate Opaque-LSA "
"Extended Prefix Opaque LSA: Area(%s), Link(%s)",
@@ -1175,7 +1175,7 @@ static int ospf_ext_link_lsa_originate1(struct ospf_area *area,
if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) {
char area_id[INET_ADDRSTRLEN];
- strncpy(area_id, inet_ntoa(area->area_id), INET_ADDRSTRLEN);
+ inet_ntop(AF_INET, &area->area_id, area_id, sizeof(area_id));
zlog_debug(
"EXT (%s): LSA[Type%u:%s]: Originate Opaque-LSA "
"Extended Link Opaque LSA: Area(%s), Link(%s)",