From c41cfe9e83c489c422371a700b25b65b35634ea7 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 16 Mar 2011 21:48:21 +1100 Subject: [PATCH] Some decompression code needs more room so simply allocate u_len for s_buf. --- stream.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stream.c b/stream.c index 32f28b0..6bfdc64 100644 --- a/stream.c +++ b/stream.c @@ -1431,10 +1431,10 @@ fill_another: fsync(control->fd_out); - s_buf = malloc(c_len); - if (unlikely(c_len && !s_buf)) - fatal("Unable to malloc buffer of size %lld in fill_buffer\n", c_len); - sinfo->ram_alloced += c_len; + s_buf = malloc(u_len); + if (unlikely(u_len && !s_buf)) + fatal("Unable to malloc buffer of size %lld in fill_buffer\n", u_len); + sinfo->ram_alloced += u_len; if (unlikely(read_buf(control, sinfo->fd, s_buf, c_len))) return -1;