Abort rather than attempt to allocate more ram than available on likely corrupt archives.

This commit is contained in:
ckolivas 2026-02-12 20:28:17 +11:00
parent 9702dece4f
commit ee5414bbe1

View file

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