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:
Con Kolivas 2013-11-04 18:41:02 -08:00
commit f80512cb29

2
rzip.c
View file

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