mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-02-13 19:04:16 +01:00
Abort rather than attempt to allocate more ram than available on likely corrupt archives.
This commit is contained in:
parent
9702dece4f
commit
ee5414bbe1
2
stream.c
2
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue