dovecot-2.2: lib-compression: istream-lz4 shouldn't crash when c...

dovecot at dovecot.org dovecot at dovecot.org
Wed May 7 10:03:25 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/2fe36249c62b
changeset: 17327:2fe36249c62b
user:      Timo Sirainen <tss at iki.fi>
date:      Wed May 07 12:26:58 2014 +0300
description:
lib-compression: istream-lz4 shouldn't crash when closing the stream multiple times.

diffstat:

 src/lib-compression/istream-lz4.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 8e6d98d34dbf -r 2fe36249c62b src/lib-compression/istream-lz4.c
--- a/src/lib-compression/istream-lz4.c	Wed May 07 12:26:38 2014 +0300
+++ b/src/lib-compression/istream-lz4.c	Wed May 07 12:26:58 2014 +0300
@@ -29,7 +29,8 @@
 {
 	struct lz4_istream *zstream = (struct lz4_istream *)stream;
 
-	buffer_free(&zstream->chunk_buf);
+	if (zstream->chunk_buf != NULL)
+		buffer_free(&zstream->chunk_buf);
 	if (close_parent)
 		i_stream_close(zstream->istream.parent);
 }


More information about the dovecot-cvs mailing list