Fixes: Timeout Fixes: 2115/clusterfuzz-testcase-minimized-6594111748440064
Unified · Split
| @@ -237,6 +237,8 @@ static int decode_pic_hdr(IVI45DecContext *ctx, AVCodecContext *avctx) · 236 unmodified lines | ||
| 237 | 237 | /* skip picture header extension if any */ |
| 238 | 238 | while (get_bits1(&ctx->gb)) { |
| 239 | 239 | ff_dlog(avctx, "Pic hdr extension encountered!\n"); |
| 240 | + if (get_bits_left(&ctx->gb) < 10) | |
| 241 | + return AVERROR_INVALIDDATA; | |
| 240 | 242 | skip_bits(&ctx->gb, 8); |
| 241 | 243 | } |
| 242 | 244 | |