diff --git a/stream.c b/stream.c index c2784ed..2af80a4 100644 --- a/stream.c +++ b/stream.c @@ -1624,6 +1624,8 @@ fill_another: sinfo->total_read += padded_len; fsync(control->fd_out); + if (unlikely(u_len > control->maxram)) + fatal_return(("Unable to malloc buffer of size %lld in this environment\n", u_len), -1); s_buf = malloc(MAX(u_len, MIN_SIZE)); if (unlikely(u_len && !s_buf)) fatal_return(("Unable to malloc buffer of size %lld in fill_buffer\n", u_len), -1);