From 43b4350ca7efa79f393cf68c62b5be5614ac9a11 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Tue, 14 Feb 2017 11:54:33 +0100 Subject: [PATCH] lib: prefix2str initialises incoming buffer in case erroneous EVPN pfx In the case, evpn prefix is requested to be transformed into string, and if the evpn prefix is not an evpn route type 5 entry, then the prefix is returning an initialised string that mentions the vpn prefix is unknown. Signed-off-by: Philippe Guibert --- lib/prefix.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/prefix.c b/lib/prefix.c index 8948a2ac19..19cf7dd8f9 100644 --- a/lib/prefix.c +++ b/lib/prefix.c @@ -880,6 +880,10 @@ prefix2str (union prefixconstptr pu, char *str, int size) buf, PREFIX2STR_BUFFER), p->prefixlen); } + else + { + sprintf (str, "UNK AF_ETHER prefix"); + } break; default: sprintf (str, "UNK prefix"); -- 2.39.5