mxfdec: Include FF_INPUT_BUFFER_PADDING_SIZE when allocating extradata.
This prevents out of bounds reads when extradata is being decoded. (cherry picked from commit 1f6f58d5855288492fc2640a9f1035c01c75d356) Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:
parent
d2411412f1
commit
e07086d8ae
@ -592,7 +592,7 @@ static int mxf_read_generic_descriptor(MXFDescriptor *descriptor, ByteIOContext
|
||||
default:
|
||||
/* Private uid used by SONY C0023S01.mxf */
|
||||
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)
|
||||
return -1;
|
||||
descriptor->extradata_size = size;
|
||||
|
Loading…
x
Reference in New Issue
Block a user