lib-sieve: plugins: relational: Fix segfault occurring in mcht_relational_validate().
The segfault happens when this match type is the last argument of the test command. This situation is not possible in a valid script; positional arguments are normally present after that, which would prevent the segfault. A variant of this bug occurs when the match type also has no argument of its own. In either case the segfault is caused by referring to absent tag arguments, which causes a NULL dereference.
Showing
- src/lib-sieve/plugins/relational/ext-relational-common.c 6 additions, 4 deletionssrc/lib-sieve/plugins/relational/ext-relational-common.c
- tests/extensions/relational/errors.svtest 18 additions, 0 deletionstests/extensions/relational/errors.svtest
- tests/extensions/relational/errors/syntax.sieve 8 additions, 0 deletionstests/extensions/relational/errors/syntax.sieve
Loading
Please register or sign in to comment