Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
lib: istream - Fix calling i_stream_nonseekable_try_seek() without in…
…termittent reads. Calling i_stream_nonseekable_try_seek() sets stream->high_pos when seeking back within buffer. Once i_stream_read_memarea() is called, the pos is set to high_pos and the high pos is cleared. However, when no read is performed in the mean time, another call to i_stream_nonseekable_try_seek() would overwrite the high_pos value with pos, causing the true value to get lost, leading to all kinds of issues. This is fixed by checking whether high_pos is already set and not touching it when it is (first value is the only valid one). One issue this caused is that the mbox storage would no longer work with compression, triggering `unexpected EOF' errors.
- Loading branch information