]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #2932 from donaldsharp/ferr_fix
authorDavid Lamparter <equinox@diac24.net>
Wed, 29 Aug 2018 04:06:53 +0000 (06:06 +0200)
committerGitHub <noreply@github.com>
Wed, 29 Aug 2018 04:06:53 +0000 (06:06 +0200)
lib: Use the actual string we want to limit '===' line to

lib/ferr.c

index 17ec51c4bfa9138b7c3b1646fe91b45075caafec..35d0fe4ff420de5e6c7e64684d938e3bcf64a91f 100644 (file)
@@ -148,7 +148,7 @@ void log_ref_display(struct vty *vty, uint32_t code, bool json)
                        snprintf(pbuf, sizeof(pbuf), "\nError %"PRIu32" - %s",
                                 ref->code, ref->title);
                        memset(ubuf, '=', strlen(pbuf));
-                       ubuf[sizeof(ubuf) - 1] = '\0';
+                       ubuf[strlen(pbuf) - 1] = '\0';
 
                        vty_out(vty, "%s\n%s\n", pbuf, ubuf);
                        vty_out(vty, "Description:\n%s\n\n", ref->description);