]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: untrusted array index (Coverity 1470113) 2508/head
authorpaco <paco@voltanet.io>
Wed, 20 Jun 2018 17:25:06 +0000 (19:25 +0200)
committerpaco <paco@voltanet.io>
Wed, 20 Jun 2018 17:25:06 +0000 (19:25 +0200)
This is a correction over 32ac96b2ba9693696d2f1156af1b80985d4e55bb, so
removing the forced string null termination doesn't involve a worse situation
than before (the underflow check should protect for the case of receiving
an incomplete buffer, which would be the cause of non-zero terminated string)

Signed-off-by: F. Aragon <paco@voltanet.io>
zebra/zebra_netns_notify.c

index bb6a5652115179086c53a3fb4e92e5006f243c85..5feb87b59dce8f4389cbdf49c82a42ea71ff84b0 100644 (file)
@@ -216,7 +216,6 @@ static int zebra_ns_notify_read(struct thread *t)
                        zlog_err("NS notify read: buffer underflow");
                        break;
                }
-               event->name[event->len] = 0;
                netnspath = ns_netns_pathname(NULL, event->name);
                if (!netnspath)
                        continue;