mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 16:47:28 +01:00
Check distance > 0 for decode_huffman_slow
decode_huffman_fast already does this. The slow flavor should too. Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6524
This commit is contained in:
1 parent
b059480f66
commit
bbc3d34e1b
3 files changed
+12
No files matched your search
@@ -2645,6 +2645,11 @@ static wuffs_deflate__status wuffs_deflate__decoder__decode_huffman_slow(
|
||||
v_bits >>= v_table_entry_n_bits;
|
||||
v_n_bits -= v_table_entry_n_bits;
|
||||
}
|
||||
if (v_distance <= 0) {
|
||||
status =
|
||||
WUFFS_DEFLATE__ERROR_INTERNAL_ERROR_INCONSISTENT_HUFFMAN_DECODER_STATE;
|
||||
goto exit;
|
||||
}
|
||||
v_n_copied = 0;
|
||||
while (true) {
|
||||
if (((uint64_t)(v_distance)) >
|
||||
|
||||
Reference in new issue
Block a user