From 29f4d5f70a85d033a516101717680aa2701f5e6d Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Tue, 22 Mar 2022 13:08:49 +0200 Subject: [PATCH] lib-test: test_istream_find - Ensure that stream is not NULL --- src/lib-test/test-istream.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.47.3