]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib: fix dynamic stack buffer overflow
authorQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 20 Apr 2018 20:40:46 +0000 (16:40 -0400)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 20 Apr 2018 20:40:46 +0000 (16:40 -0400)
oops

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
lib/thread.c

index f3129e39e83af39fdb5f1ac3b351518b37cdff00..8764c055cb989f226eea765d85f7da29a2f21ffb 100644 (file)
@@ -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",