From 3f375385a50b7a6f3a0acdc0c4bd44569e61783e Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 16 May 2018 16:30:54 +1000 Subject: [PATCH] Avoid crash from corrupt archive reading matches beyond end of stream. --- stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream.c b/stream.c index cc2b4a4..9669a9d 100644 --- a/stream.c +++ b/stream.c @@ -1567,9 +1567,9 @@ static int fill_buffer(rzip_control *control, struct stream_info *sinfo, int str stream_thread_struct *st; uchar c_type, *s_buf; - dealloc(s->buf); if (s->eos) goto out; + dealloc(s->buf); fill_another: if (unlikely(ucthread[s->uthread_no].busy)) failure_return(("Trying to start a busy thread, this shouldn't happen!\n"), -1);