mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
mxfdec: Include FF_INPUT_BUFFER_PADDING_SIZE when allocating extradata.
This prevents out of bounds reads when extradata is being decoded.
This commit is contained in:
parent
a3bf7b864a
commit
1f6f58d585
@ -600,7 +600,7 @@ static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int
|
|||||||
default:
|
default:
|
||||||
/* Private uid used by SONY C0023S01.mxf */
|
/* Private uid used by SONY C0023S01.mxf */
|
||||||
if (IS_KLV_KEY(uid, mxf_sony_mpeg4_extradata)) {
|
if (IS_KLV_KEY(uid, mxf_sony_mpeg4_extradata)) {
|
||||||
descriptor->extradata = av_malloc(size);
|
descriptor->extradata = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
if (!descriptor->extradata)
|
if (!descriptor->extradata)
|
||||||
return -1;
|
return -1;
|
||||||
descriptor->extradata_size = size;
|
descriptor->extradata_size = size;
|
||||||
|
Loading…
Reference in New Issue
Block a user