From: Aki Tuomi Date: Tue, 22 Mar 2022 11:08:49 +0000 (+0200) Subject: lib-test: test_istream_find - Ensure that stream is not NULL X-Git-Tag: 2.4.0~4213 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=29f4d5f70a85d033a516101717680aa2701f5e6d;p=thirdparty%2Fdovecot%2Fcore.git lib-test: test_istream_find - Ensure that stream is not NULL --- diff --git a/src/lib-test/test-istream.c b/src/lib-test/test-istream.c index 1d20748645..99756c1228 100644 --- a/src/lib-test/test-istream.c +++ b/src/lib-test/test-istream.c @@ -135,6 +135,8 @@ static struct test_istream *test_istream_find(struct istream *input) { struct istream *in; + i_assert(input != NULL); + for (in = input; in != NULL; in = in->real_stream->parent) { if (in->real_stream->read == test_read) return (struct test_istream *)in->real_stream;