From 8dd1b6ea58f49b317cf0f2e48d9ca9afd967c5ee Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 3 Dec 2010 20:02:39 +1100 Subject: [PATCH] Make sure chunk to compress is of a minimum size. --- rzip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rzip.c b/rzip.c index 182a8f3..6e22756 100644 --- a/rzip.c +++ b/rzip.c @@ -544,7 +544,7 @@ static void hash_search(struct rzip_state *st, double pct_base, double pct_multi /* Flush stream 1 at equal intervals if the buffer has not * filled to bufsize */ if (sinfo->s[1].eos < p / (st->chunk_size / control.threads) && - p >= STREAM_BUFSIZE) { + sinfo->s[1].buflen >= STREAM_BUFSIZE) { flush_buffer(sinfo, 1); } sb.offset_search = p;