decompress_gunzip.c (rufus-3.12) | : | decompress_gunzip.c (rufus-3.13) | ||
---|---|---|---|---|
skipping to change at line 1032 | skipping to change at line 1032 | |||
/* For unzip */ | /* For unzip */ | |||
IF_DESKTOP(long long) int FAST_FUNC | IF_DESKTOP(long long) int FAST_FUNC | |||
inflate_unzip(transformer_state_t *xstate) | inflate_unzip(transformer_state_t *xstate) | |||
{ | { | |||
IF_DESKTOP(long long) int n; | IF_DESKTOP(long long) int n; | |||
DECLARE_STATE; | DECLARE_STATE; | |||
ALLOC_STATE; | ALLOC_STATE; | |||
if (state == NULL) | ||||
return -1; | ||||
to_read = xstate->bytes_in; | to_read = xstate->bytes_in; | |||
// bytebuffer_max = 0x8000; | // bytebuffer_max = 0x8000; | |||
bytebuffer_offset = 4; | bytebuffer_offset = 4; | |||
bytebuffer = xmalloc(bytebuffer_max); | bytebuffer = xmalloc(bytebuffer_max); | |||
n = inflate_unzip_internal(PASS_STATE xstate); | n = inflate_unzip_internal(PASS_STATE xstate); | |||
free(bytebuffer); | free(bytebuffer); | |||
xstate->crc32 = gunzip_crc; | xstate->crc32 = gunzip_crc; | |||
xstate->bytes_out = gunzip_bytes_out; | xstate->bytes_out = gunzip_bytes_out; | |||
skipping to change at line 1204 | skipping to change at line 1206 | |||
return unpack_Z_stream(xstate); | return unpack_Z_stream(xstate); | |||
} | } | |||
if (magic2 != GZIP_MAGIC) | if (magic2 != GZIP_MAGIC) | |||
goto bad_magic; | goto bad_magic; | |||
} | } | |||
#endif | #endif | |||
total = 0; | total = 0; | |||
ALLOC_STATE; | ALLOC_STATE; | |||
if (state == NULL) { | ||||
bb_error_msg("alloc error"); | ||||
return -1; | ||||
} | ||||
to_read = -1; | to_read = -1; | |||
// bytebuffer_max = 0x8000; | // bytebuffer_max = 0x8000; | |||
bytebuffer = xmalloc(bytebuffer_max); | bytebuffer = xmalloc(bytebuffer_max); | |||
if (bytebuffer == NULL) { | ||||
bb_error_msg("alloc error"); | ||||
total = -1; | ||||
goto ret; | ||||
} | ||||
gunzip_src_fd = xstate->src_fd; | gunzip_src_fd = xstate->src_fd; | |||
again: | again: | |||
if (!check_header_gzip(PASS_STATE xstate)) { | if (!check_header_gzip(PASS_STATE xstate)) { | |||
bb_error_msg("corrupted data"); | bb_error_msg("corrupted data"); | |||
total = -1; | total = -1; | |||
goto ret; | goto ret; | |||
} | } | |||
n = inflate_unzip_internal(PASS_STATE xstate); | n = inflate_unzip_internal(PASS_STATE xstate); | |||
End of changes. 3 change blocks. | ||||
0 lines changed or deleted | 11 lines changed or added |