mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-14 02:50:11 +01:00
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>
This commit is contained in:
@@ -552,7 +552,7 @@ static int cfhd_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
width, height * 2);
|
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)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@@ -760,7 +760,6 @@ static int cfhd_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
} else if (count > 0) {
|
} else if (count > 0) {
|
||||||
count = put_runcode(pb, count, rb);
|
count = put_runcode(pb, count, rb);
|
||||||
}
|
}
|
||||||
|
|
||||||
put_bits(pb, cb[index].size, cb[index].bits);
|
put_bits(pb, cb[index].size, cb[index].bits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user