diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2021-09-14 14:12:23 +0200 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-09-14 14:12:23 +0200 |
commit | 6ccb661c089b1b377f799018cd5e0e088a9876a3 (patch) | |
tree | 114bbefa2a36913a14205f936be9e510cc97e45f /lib/command_match.c | |
parent | Merge pull request #9592 from ton31337/fix/bgp_neighbor_strip_whitespace (diff) | |
download | frr-6ccb661c089b1b377f799018cd5e0e088a9876a3.tar.xz frr-6ccb661c089b1b377f799018cd5e0e088a9876a3.zip |
lib: fix segfault on question mark on empty line
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to '')
-rw-r--r-- | lib/command_match.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/command_match.c b/lib/command_match.c index 56a7ae422..f221e0a02 100644 --- a/lib/command_match.c +++ b/lib/command_match.c @@ -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"); } |