From 07f7a1effc353ce66f268e26ba2625e20067dddb Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 18 Jun 2018 23:24:59 -0400 Subject: parse: Don't leave expr->mode_cmp uninitialized When adding support for -perm +7777, I introduced an unconditional break that should have been conditional. The bug was observable with $ ./tests.sh --verbose --bfs="valgrind $PWD/bfs" test_perm_leading_plus_symbolic Fixes: 7f8bacca4c2b1d35bb65ddf8cbf70fadf1adf66e --- parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'parse.c') diff --git a/parse.c b/parse.c index 2811004..36c8399 100644 --- a/parse.c +++ b/parse.c @@ -1826,8 +1826,8 @@ static struct expr *parse_perm(struct parser_state *state, int field, int arg2) if (mode[1] >= '0' && mode[1] <= '9') { expr->mode_cmp = MODE_ANY; ++mode; + break; } - break; default: expr->mode_cmp = MODE_EXACT; break; -- cgit v1.2.3