mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avcodec/hdrenc: Allocate more space
This needs to be double checked or a checking way of writing should be used Fixes: out of array access Fixes: 70007/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HDR_fuzzer-5478704150020096 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:
parent
5dde255abd
commit
204f7f8cc7
@ -124,7 +124,7 @@ static int hdr_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
uint8_t *buf;
|
uint8_t *buf;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
packet_size = avctx->width * avctx->height * 4LL + 1024LL;
|
packet_size = avctx->height * 4LL + avctx->width * avctx->height * 8LL + 1024LL;
|
||||||
if ((ret = ff_get_encode_buffer(avctx, pkt, packet_size, 0)) < 0)
|
if ((ret = ff_get_encode_buffer(avctx, pkt, packet_size, 0)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user