lib: fix dynamic stack buffer overflow

oops

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2018-04-20 16:40:46 -04:00
parent 7b9fdc412d
commit 4f113d6066

View 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",