Fixes: Timeout Fixes: 64479/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EIGHTBPS_fuzzer-5434435386081280
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -63,7 +63,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 62 unmodified lines | |||
| 63 | unsigned int planes = c->planes; | 63 | unsigned int planes = c->planes; |
| 64 | int ret; | 64 | int ret; |
| 65 | 65 | ||
| 66 | if (buf_size < planes * height * 2) | 66 | if (buf_size < planes * height * (2 + 2*((avctx->width+128)/129))) |
| 67 | return AVERROR_INVALIDDATA; | 67 | return AVERROR_INVALIDDATA; |
| 68 | 68 | ||
| 69 | if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) | 69 | if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) |