Some decompression code needs more room so simply allocate u_len for s_buf.

This commit is contained in:
Con Kolivas 2011-03-16 21:48:21 +11:00
parent 5fd7c82e1f
commit c41cfe9e83

View file

@ -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;