diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-07-19 22:50:00 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-07-23 23:21:16 +0200 |
commit | a308d79e4dedea11667cb2ad42c6676ce96e8ee1 (patch) | |
tree | 98a016cad1a96caef67f183d8173f3a99c52c206 | |
parent | 6420c1bf30884d5feb69d0a6f116eaceac02dacc (diff) | |
download | ffmpeg-a308d79e4dedea11667cb2ad42c6676ce96e8ee1.tar.gz |
avcodec/cfhdenc: Allocate more space
Fixes: Assertion failure
Fixes: 68979/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5375874714107904
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/cfhdenc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/cfhdenc.c b/libavcodec/cfhdenc.c index 5657d0f96c..09fb2bd743 100644 --- a/libavcodec/cfhdenc.c +++ b/libavcodec/cfhdenc.c @@ -552,7 +552,7 @@ static int cfhd_encode_frame(AVCodecContext *avctx, AVPacket *pkt, width, height * 2); } - ret = ff_alloc_packet(avctx, pkt, 256LL + s->planes * (2LL * avctx->width * (avctx->height + 15) + 2048LL)); + ret = ff_alloc_packet(avctx, pkt, 256LL + s->planes * (4LL * avctx->width * (avctx->height + 15) + 2048LL)); if (ret < 0) return ret; @@ -760,7 +760,6 @@ static int cfhd_encode_frame(AVCodecContext *avctx, AVPacket *pkt, } else if (count > 0) { count = put_runcode(pb, count, rb); } - put_bits(pb, cb[index].size, cb[index].bits); } |