]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: New version of GCC with new warnings 873/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 27 Jul 2017 22:19:31 +0000 (18:19 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 27 Jul 2017 22:19:31 +0000 (18:19 -0400)
GCC 7.1.1 returned warnings about buffer sizes
not being big enough to handle the full string
that could be generated.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
ospf6d/ospf6_intra.c
ospf6d/ospf6_lsa.c
ospf6d/ospf6_neighbor.c
ospf6d/ospf6_route.c

index 7c5c44fca71df3dee195aa73321fa27de2e5987d..015776a1743862ec60b1b1cae5568e4e3df688d3 100644 (file)
@@ -1437,7 +1437,7 @@ static void ospf6_brouter_debug_print(struct ospf6_route *brouter)
        char brouter_name[16];
        char area_name[16];
        char destination[64];
-       char installed[16], changed[16];
+       char installed[64], changed[64];
        struct timeval now, res;
        char id[16], adv_router[16];
        char capa[16], options[16];
index 329060a16f7b2f685e919c7e0c02f5dd59802ba3..e1a431ea07245f57dd536897e2355077f65733b7 100644 (file)
@@ -467,7 +467,7 @@ void ospf6_lsa_show(struct vty *vty, struct ospf6_lsa *lsa)
        char adv_router[64], id[64];
        struct ospf6_lsa_handler *handler;
        struct timeval now, res;
-       char duration[16];
+       char duration[64];
 
        assert(lsa && lsa->header);
 
index a21da074831406a0b5f98c742e53065d423286b8..bde89f54a604b1be465f297c4d6caefec7d75d80 100644 (file)
@@ -582,10 +582,10 @@ int inactivity_timer(struct thread *thread)
 static void ospf6_neighbor_show(struct vty *vty, struct ospf6_neighbor *on)
 {
        char router_id[16];
-       char duration[16];
+       char duration[64];
        struct timeval res;
        char nstate[16];
-       char deadtime[16];
+       char deadtime[64];
        long h, m, s;
 
        /* Router-ID (Name) */
@@ -640,7 +640,7 @@ static void ospf6_neighbor_show_drchoice(struct vty *vty,
 {
        char router_id[16];
        char drouter[16], bdrouter[16];
-       char duration[16];
+       char duration[64];
        struct timeval now, res;
 
        /*
index 5e8fd0e15d7bf5f47902b43f45f0131fc47c9578..e0e9fc9449074f42b366f3deecf14c5d4deaa21d 100644 (file)
@@ -945,7 +945,7 @@ void ospf6_route_show(struct vty *vty, struct ospf6_route *route)
 {
        int i;
        char destination[PREFIX2STR_BUFFER], nexthop[64];
-       char duration[16];
+       char duration[64];
        const char *ifname;
        struct timeval now, res;
        struct listnode *node;
@@ -991,7 +991,7 @@ void ospf6_route_show_detail(struct vty *vty, struct ospf6_route *route)
        char destination[PREFIX2STR_BUFFER], nexthop[64];
        char area_id[16], id[16], adv_router[16], capa[16], options[16];
        struct timeval now, res;
-       char duration[16];
+       char duration[64];
        struct listnode *node;
        struct ospf6_nexthop *nh;