Commit Graph

4 Commits

Author SHA1 Message Date
Andreas Rheinhardt 321c31cfe6 avcodec/cbs_jpeg: Fix size of huffman symbol table array
L[i] can be in the range of 0-255, see table B.5 of ITU T.81.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:40 +01:00
Michael Niedermayer 18f5256c0d avcodec/cbs_jpeg_syntax_template: Check array index in huffman_table()
Fixes: index 224 out of bounds for type 'uint8_t [224]'
Fixes: 21534/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-6291612167831552

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-04-15 18:48:23 +02:00
Michael Niedermayer d31862c2b1 avcodec/cbs_jpeg_syntax_template: Check table index before use in dht()
Fixes: out of array access
Fixes: 21515/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5766121576988672

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-04-15 18:48:23 +02:00
Mark Thompson 525de2000b lavc/cbs: Add JPEG support 2018-09-23 14:42:34 +01:00