summaryrefslogtreecommitdiff
path: root/lib/command_match.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2016-08-09 17:37:01 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2016-08-09 17:37:01 +0000
commit4427e9b3eeb6aaff3882dd1e96e14af62fa37ad4 (patch)
tree1cb9919bd6e5b661f8b6900b2510109319ec0e68 /lib/command_match.c
parent1ab84bf32f891c9aa62e1d2a42501a0df7d6aec0 (diff)
lib: Fix various minor bugs
- cmd_make_strvec returns null pointer if str begins with a '#' - disallow options nested options - NULL out state variable in parser - flip backwards comparison - fix memory leak in lexer Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command_match.c')
-rw-r--r--lib/command_match.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/command_match.c b/lib/command_match.c
index 011ac698cb..9b9f8a0ec5 100644
--- a/lib/command_match.c
+++ b/lib/command_match.c
@@ -158,6 +158,8 @@ match_command (struct graph_node *start,
static struct list *
match_command_r (struct graph_node *start, vector vline, unsigned int n)
{
+ assert (n < vector_active (vline));
+
// get the minimum match level that can count as a full match
enum match_type minmatch = min_match_level (start->type);