mb_change_bits is given space based on height >> 2, while more data is read Fixes: out of array access Fixes: 62285/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION1_fuzzer-5201925062590464.fuzz
Unified · Split
| @@ -408,6 +408,11 @@ static int truemotion1_decode_header(TrueMotion1Context *s) · 407 unmodified lines | ||
| 408 | 408 | return AVERROR_PATCHWELCOME; |
| 409 | 409 | } |
| 410 | 410 | |
| 411 | + if (s->h & 3) { | |
| 412 | + avpriv_request_sample(s->avctx, "Frame with height not being a multiple of 4"); | |
| 413 | + return AVERROR_PATCHWELCOME; | |
| 414 | + } | |
| 415 | + | |
| 411 | 416 | if (s->w != s->avctx->width || s->h != s->avctx->height || |
| 412 | 417 | new_pix_fmt != s->avctx->pix_fmt) { |
| 413 | 418 | av_frame_unref(s->frame); |