From ee5414bbe12be6db3af98f41139b495fd3265bd1 Mon Sep 17 00:00:00 2001 From: ckolivas Date: Thu, 12 Feb 2026 20:28:17 +1100 Subject: [PATCH] Abort rather than attempt to allocate more ram than available on likely corrupt archives. --- stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream.c b/stream.c index 4fd73e2..a63cb42 100644 --- a/stream.c +++ b/stream.c @@ -1690,7 +1690,7 @@ fill_another: fsync(control->fd_out); if (unlikely(u_len > control->maxram)) - print_output("Warning, attempting to malloc very large buffer for this environment of size %"PRId64"\n", u_len); + fatal_return(("Unable to allocate enough memory for %"PRId64" specified in possibly corrupt archive\n"), -1); max_len = MAX(u_len, MIN_SIZE); max_len = MAX(max_len, c_len); s_buf = malloc(max_len);