]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-dcrypt: Avoid infinite loop if istream header is too large.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 5 Sep 2016 23:56:39 +0000 (02:56 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 6 Sep 2016 16:08:11 +0000 (19:08 +0300)
commit6a008d83f39981731372fd24b6653af674a33448
tree271c7d7199e30df1df60675ee6264bfca671f721
parentb5d604ba1775dbb841ec367724eb61b19d14a3e3
lib-dcrypt: Avoid infinite loop if istream header is too large.

We'll return an error now instead. We can't just return -2 here, because nothing
was actually being returned to the caller. Attempting to do that would just trigger
an assert:

Panic: file istream.c: line 182 (i_stream_read): assertion failed: (_stream->skip != _stream->pos)
src/lib-dcrypt/istream-decrypt.c
src/lib-dcrypt/test-stream.c