]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Assert if i_stream_create_seekable_path(temp_path_prefix==NULL)
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 19 Sep 2016 13:20:14 +0000 (16:20 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 19 Sep 2016 13:20:14 +0000 (16:20 +0300)
If the stream becomes large enough it would crash then in a callback
function, which makes debugging more difficult.

src/lib/istream-seekable.c

index f6340be5f9510c754b40cb08cb086d490880ec13..f051fcc25770179767ddf0ec3c6e4294130eb93b 100644 (file)
@@ -477,6 +477,7 @@ i_stream_create_seekable_path(struct istream *input[],
        struct seekable_istream *sstream;
        struct istream *stream;
 
+       i_assert(temp_path_prefix != NULL);
        i_assert(max_buffer_size > 0);
 
        if (inputs_are_seekable(input))