]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospf6d: New version of GCC with new warnings
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 27 Jul 2017 22:19:31 +0000 (18:19 -0400)
committerMartin Winter <mwinter@opensourcerouting.org>
Tue, 5 Dec 2017 08:33:41 +0000 (00:33 -0800)
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 a19c3f40763f6797993f2db33eeb483566115804..79674b72de676eeebfa471099341cb4923cb6c32 100644 (file)
@@ -1446,7 +1446,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 0e10ab15e3d390c635c2cb5c4cbfda191b57ce44..f4b2f4090f76697d230f0efdd7df9a4919184bf7 100644 (file)
@@ -468,7 +468,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 b7fd20cb884e5fea9178fb8ba76bfdce88f82143..9693c4b051a0c88a4639dd4e5f1e369d490bc94a 100644 (file)
@@ -587,10 +587,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) */
@@ -645,7 +645,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 88dd7b2187ef55e8d22f6ff6258f711b6abb2f48..43402f0c4467c453d7cd198fed223406730a48d8 100644 (file)
@@ -946,7 +946,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;
@@ -992,7 +992,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;