Merge pull request #8805 from opensourcerouting/find-asan-crash

lib: fix address sanitizer crash on `find`
This commit is contained in:
Igor Ryzhov 2021-06-07 23:19:55 +03:00 committed by GitHub
commit 78c724e16a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1496,7 +1496,7 @@ static void permute(struct graph_node *start, struct vty *vty)
static void print_cmd(struct vty *vty, const char *cmd)
{
int i, j, len = strlen(cmd);
char buf[len];
char buf[len + 1];
bool skip = false;
j = 0;