mirror of
https://github.com/vasi/pixz
synced 2024-10-30 15:21:41 +00:00
Fix an off-by-one error that causes memory corruption.
We read up to bsize bytes from gInFile, so allocate as much memory.
This commit is contained in:
parent
75f27d8850
commit
943932c0e8
@ -538,7 +538,7 @@ static void read_thread(void) {
|
||||
pipeline_item_t *pi;
|
||||
queue_pop(gPipelineStartQ, (void**)&pi);
|
||||
io_block_t *ib = (io_block_t*)(pi->data);
|
||||
block_capacity(ib, iter.block.unpadded_size,
|
||||
block_capacity(ib, bsize,
|
||||
iter.block.uncompressed_size);
|
||||
|
||||
ib->insize = fread(ib->input, 1, bsize, gInFile);
|
||||
|
Loading…
Reference in New Issue
Block a user