Fixes invalid reads.
Unified · Split
| @@ -4495,6 +4495,12 @@ static int execute_decode_slices(H264Context *h, int context_count) · 4494 unmodified lines | |||
| 4495 | H264Context *hx; | 4495 | H264Context *hx; |
| 4496 | int i; | 4496 | int i; |
| 4497 | 4497 | ||
| 4498 | if (h->mb_y >= h->mb_height) { | ||
| 4499 | av_log(h->avctx, AV_LOG_ERROR, | ||
| 4500 | "Input contains more MB rows than the frame height.\n"); | ||
| 4501 | return AVERROR_INVALIDDATA; | ||
| 4502 | } | ||
| 4503 | |||
| 4498 | if (h->avctx->hwaccel) | 4504 | if (h->avctx->hwaccel) |
| 4499 | return 0; | 4505 | return 0; |
| 4500 | if (context_count == 1) { | 4506 | if (context_count == 1) { |