1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-23 00:28:11 +00:00

Increase unzReadCurrentFile() chunk size to INT_MAX

This commit is contained in:
Jukka Ojanen 2021-09-02 16:03:25 +03:00
parent 592b28f65f
commit ac9d2241c2

View File

@ -421,7 +421,7 @@ size_t hc_fread (void *ptr, size_t size, size_t nmemb, HCFILE *fp)
do
{
unsigned chunk = (len > HCFILE_CHUNK_SIZE) ? HCFILE_CHUNK_SIZE : (unsigned) len;
unsigned chunk = (len > INT_MAX) ? INT_MAX : (unsigned) len;
int result = unzReadCurrentFile (fp->ufp, (unsigned char *) ptr + pos, chunk);
if (result < 0) return (size_t) -1;
pos += (u64) result;