Commit 1f6f58d5 authored by Alex Converse's avatar Alex Converse

mxfdec: Include FF_INPUT_BUFFER_PADDING_SIZE when allocating extradata.

This prevents out of bounds reads when extradata is being decoded.
parent a3bf7b86
......@@ -600,7 +600,7 @@ static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment