Daniel Axtens 210245129c video/readers/png: Avoid heap OOB R/W inserting huff table items
In fuzzing we observed crashes where a code would attempt to be inserted
into a huffman table before the start, leading to a set of heap OOB reads
and writes as table entries with negative indices were shifted around and
the new code written in.

Catch the case where we would underflow the array and bail.

Fixes: CVE-2021-3696

Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2022-06-07 16:39:32 +02:00
..
2020-07-29 16:55:47 +02:00
2022-03-14 16:00:48 +01:00
2022-03-14 16:00:48 +01:00
2022-03-14 16:00:48 +01:00
2022-03-14 16:00:48 +01:00
2022-03-14 16:00:48 +01:00
2022-03-14 16:00:48 +01:00
2022-03-14 16:00:48 +01:00
2010-08-19 16:54:00 +05:30
2022-03-14 16:00:48 +01:00
2022-03-14 16:00:48 +01:00