]> git.puffer.fish Git - mirror/frr.git/commitdiff
bfdd: fix parameter length 6978/head
authorIgor Ryzhov <iryzhov@nfware.com>
Mon, 24 Aug 2020 15:45:53 +0000 (18:45 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Mon, 24 Aug 2020 15:45:53 +0000 (18:45 +0300)
There is no space reserved for "[source-addr='']".

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
bfdd/bfdd_cli.c

index 058ce7d1f27dc07b8e659e033ebec8b5e227d474..d115684b1cf4f4c6961424627651f0715049f389 100644 (file)
@@ -109,7 +109,7 @@ DEFPY_YANG_NOSH(
        VRF_NAME_STR)
 {
        int ret, slen;
-       char source_str[INET6_ADDRSTRLEN];
+       char source_str[INET6_ADDRSTRLEN + 32];
        char xpath[XPATH_MAXLEN], xpath_srcaddr[XPATH_MAXLEN + 32];
 
        if (multihop)
@@ -168,7 +168,7 @@ DEFPY_YANG(
 {
        int slen;
        char xpath[XPATH_MAXLEN];
-       char source_str[INET6_ADDRSTRLEN];
+       char source_str[INET6_ADDRSTRLEN + 32];
 
        if (multihop)
                snprintf(source_str, sizeof(source_str), "[source-addr='%s']",