From 5c811a931105c9a9e868d1d7c510c398e4932935 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 1 Sep 2013 15:02:52 +1000 Subject: [PATCH] We have to run through the clear buffer function even for empty buffers or corrupt archives with empty match streams. --- stream.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stream.c b/stream.c index 6ddbb90..3bec94c 100644 --- a/stream.c +++ b/stream.c @@ -1758,9 +1758,8 @@ int close_stream_out(rzip_control *control, void *ss) int i; for (i = 0; i < sinfo->num_streams; i++) { - if (sinfo->s[i].buflen) - if (unlikely(!clear_buffer(control, sinfo, i, 0))) - return -1; + if (unlikely(!clear_buffer(control, sinfo, i, 0))) + return -1; } if (ENCRYPT) {