summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-10-29 23:04:59 +0000
committerjstebbins <[email protected]>2014-10-29 23:04:59 +0000
commit1cd7d895710ae24bbf4455fdcafa096d092ec9d6 (patch)
treedf2ddcdf7c0236a97d11b0b6cda57257859ce326
parent238f2aeca97a566a243bc96a5fd5c78a2cae5a3c (diff)
decavcodec: fix a 4 byte overread of extradata by libav
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6480 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--libhb/decavcodec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c
index 4eb9f6947..a0bd0454a 100644
--- a/libhb/decavcodec.c
+++ b/libhb/decavcodec.c
@@ -1752,7 +1752,8 @@ static int setup_extradata( hb_work_object_t *w, hb_buffer_t *in )
if (size > 0)
{
pv->context->extradata_size = size;
- pv->context->extradata = av_malloc(size);
+ pv->context->extradata =
+ av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
if (pv->context->extradata == NULL)
return 1;
memcpy(pv->context->extradata, in->data, size);