Merge pull request #2098 from qlyoung/fix-underline-buf-overflow

lib: fix dynamic stack buffer overflow
This commit is contained in:
Lou Berger 2018-04-23 11:01:34 -04:00 committed by GitHub
commit b2f6b81e7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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