From: Quentin Young Date: Fri, 20 Apr 2018 20:40:46 +0000 (-0400) Subject: lib: fix dynamic stack buffer overflow X-Git-Tag: frr-5.0-dev~25^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F2098%2Fhead;p=mirror%2Ffrr.git lib: fix dynamic stack buffer overflow oops Signed-off-by: Quentin Young --- diff --git a/lib/thread.c b/lib/thread.c index f3129e39e8..8764c055cb 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -140,7 +140,7 @@ static void cpu_record_print(struct vty *vty, thread_type filter) char underline[strlen(name) + 1]; memset(underline, '-', sizeof(underline)); - underline[sizeof(underline)] = '\0'; + underline[sizeof(underline) - 1] = '\0'; vty_out(vty, "\n"); vty_out(vty, "Showing statistics for pthread %s\n",