Fixes: Assertion failure Fixes: 68979/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5375874714107904
Unified · Split
| @@ -552,7 +552,7 @@ static int cfhd_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 551 unmodified lines | |||
| 552 | width, height * 2); | 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 | if (ret < 0) | 556 | if (ret < 0) |
| 557 | return ret; | 557 | return ret; |
| 558 | 558 | ||
| @@ -760,7 +760,6 @@ static int cfhd_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 201 unmodified lines | |||
| 760 | } else if (count > 0) { | 760 | } else if (count > 0) { |
| 761 | count = put_runcode(pb, count, rb); | 761 | count = put_runcode(pb, count, rb); |
| 762 | } | 762 | } |
| 763 | |||
| 764 | put_bits(pb, cb[index].size, cb[index].bits); | 763 | put_bits(pb, cb[index].size, cb[index].bits); |
| 765 | } | 764 | } |
| 766 | 765 | ||