summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2018-06-18 23:24:59 -0400
committerTavian Barnes <tavianator@tavianator.com>2018-06-18 23:24:59 -0400
commit07f7a1effc353ce66f268e26ba2625e20067dddb (patch)
tree559eb2ed2897a70c070424fb61f0446842e0fcaf /parse.c
parenta4c910d77d470f36a684eae576c913fd3211ea90 (diff)
downloadbfs-07f7a1effc353ce66f268e26ba2625e20067dddb.tar.xz
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
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c2
1 files changed, 1 insertions, 1 deletions
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;