Fixes: Assertion failure Fixes: 68979/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5375874714107904
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -552,7 +552,7 @@ static int cfhd_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 551 unmodified lines | ||
| 552 | 552 | width, height * 2); |
| 553 | 553 | } |
| 554 | 554 | |
| 555 | − ret = ff_alloc_packet(avctx, pkt, 256LL + s->planes * (2LL * avctx->width * (avctx->height + 15) + 2048LL)); | |
| 555 | + ret = ff_alloc_packet(avctx, pkt, 256LL + s->planes * (4LL * avctx->width * (avctx->height + 15) + 2048LL)); | |
| 556 | 556 | if (ret < 0) |
| 557 | 557 | return ret; |
| 558 | 558 | |
| @@ -760,7 +760,6 @@ static int cfhd_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 201 unmodified lines | ||
| 760 | 760 | } else if (count > 0) { |
| 761 | 761 | count = put_runcode(pb, count, rb); |
| 762 | 762 | } |
| 763 | − | |
| 764 | 763 | put_bits(pb, cb[index].size, cb[index].bits); |
| 765 | 764 | } |
| 766 | 765 | |