mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-01-09 01:50:02 +01:00
Merge pull request #27 from Maeyanie/patch-1
Fix 'Failed to malloc ckbuf in hash_search2' with very large files.
This commit is contained in:
commit
f80512cb29
2
rzip.c
2
rzip.c
|
|
@ -745,7 +745,7 @@ static inline bool hash_search(rzip_control *control, struct rzip_state *st,
|
|||
cksum_chunks = control->checksum.len / control->maxram;
|
||||
cksum_remains = control->checksum.len % control->maxram;
|
||||
|
||||
control->checksum.buf = malloc(control->checksum.len);
|
||||
control->checksum.buf = malloc(control->maxram);
|
||||
if (unlikely(!control->checksum.buf))
|
||||
fatal_return(("Failed to malloc ckbuf in hash_search2\n"), false);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue