We have to run through the clear buffer function even for empty buffers or corrupt archives with empty match streams.

This commit is contained in:
Con Kolivas 2013-09-01 15:02:52 +10:00
parent 568dffafbc
commit 5c811a9311

View file

@ -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) {