Skip to content

Commit

Permalink
Merge pull request #45 from codylico/incidental-repairs
Browse files Browse the repository at this point in the history
Incidental repairs

- Add missing history tracking for uncompressed blocks, to allow for
  correct handling of ZLIB streams with multiple types of blocks,
  such as direct/dynamic block streams.
  • Loading branch information
codylico authored Oct 26, 2021
2 parents 748402f + f995ddc commit f3f5997
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/inflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,10 @@ int pngparts_inflate_one
res = (*put_cb)(put_data,ch);
if (res != PNGPARTS_API_OK){
break;
} else fl->block_length -= 1;
} else {
fl->block_length -= 1;
pngparts_flate_history_add(fl,ch);
}
}
if (fl->block_length == 0){
if (last_block) {
Expand Down

0 comments on commit f3f5997

Please sign in to comment.