From e8af1162867899046d27596f640521eee5ab7b54 Mon Sep 17 00:00:00 2001 From: Stephan Bosch <stephan.bosch@open-xchange.com> Date: Sun, 6 Oct 2019 19:36:32 +0200 Subject: [PATCH] lib-sieve: sieve-stringlist - Assert that index for the index stringlist is not 0. --- src/lib-sieve/sieve-stringlist.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib-sieve/sieve-stringlist.c b/src/lib-sieve/sieve-stringlist.c index 9e226e502..17b7d5ce1 100644 --- a/src/lib-sieve/sieve-stringlist.c +++ b/src/lib-sieve/sieve-stringlist.c @@ -218,6 +218,7 @@ static int sieve_index_stringlist_next_item index = strlist->index; } + i_assert(index > 0); while ( index > 0 ) { if ( (ret=sieve_stringlist_next_item(strlist->source, str_r)) <= 0 ) { if (ret < 0) -- GitLab