From: paco Date: Wed, 20 Jun 2018 17:25:06 +0000 (+0200) Subject: zebra: untrusted array index (Coverity 1470113) X-Git-Tag: frr-6.1-dev~276^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=7f61ea7bd47bfd86a2c873870507281b1837dcdd;p=matthieu%2Ffrr.git zebra: untrusted array index (Coverity 1470113) 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 --- diff --git a/zebra/zebra_netns_notify.c b/zebra/zebra_netns_notify.c index bb6a565211..5feb87b59d 100644 --- a/zebra/zebra_netns_notify.c +++ b/zebra/zebra_netns_notify.c @@ -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;