Fixes: out of array access
Fixes: 9225/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEGLS_fuzzer-5684770334834688
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ee1e3ca5eb1ec7d34e925d129c893e33847ee0b7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
... | ... |
@@ -626,6 +626,10 @@ unk_pixfmt: |
626 | 626 |
avpriv_report_missing_feature(s->avctx, "Lowres for weird subsampling"); |
627 | 627 |
return AVERROR_PATCHWELCOME; |
628 | 628 |
} |
629 |
+ if ((AV_RB32(s->upscale_h) || AV_RB32(s->upscale_v)) && s->progressive && s->avctx->pix_fmt == AV_PIX_FMT_GBRP) { |
|
630 |
+ avpriv_report_missing_feature(s->avctx, "progressive for weird subsampling"); |
|
631 |
+ return AVERROR_PATCHWELCOME; |
|
632 |
+ } |
|
629 | 633 |
if (s->ls) { |
630 | 634 |
memset(s->upscale_h, 0, sizeof(s->upscale_h)); |
631 | 635 |
memset(s->upscale_v, 0, sizeof(s->upscale_v)); |