mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-11 23:17:34 +00:00
Merge pull request #9608 from idryzhov/vtysh-segfault
lib: fix segfault on question mark on empty line
This commit is contained in:
commit
bc4477ecbd
@ -81,7 +81,7 @@ static enum match_type match_mac(const char *, bool);
|
||||
|
||||
static bool is_neg(vector vline, size_t idx)
|
||||
{
|
||||
if (idx >= vector_active(vline))
|
||||
if (idx >= vector_active(vline) || !vector_slot(vline, idx))
|
||||
return false;
|
||||
return !strcmp(vector_slot(vline, idx), "no");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user