Commit f4680cc3 authored by Frederick Ding's avatar Frederick Ding

Merge branch 'master' of github.com:HandBrake/HandBrake into master-build

* 'master' of github.com:HandBrake/HandBrake:
  stream: fix size of subtitle extradata
  stream: fix subtitle extradata buffer over-read
parents 4b398efb d18951c2
Pipeline #78724080 passed with stages
in 63 minutes and 36 seconds
......@@ -5538,10 +5538,11 @@ static void add_ffmpeg_subtitle( hb_title_t *title, hb_stream_t *stream, int id
// Copy the extradata for the subtitle track
if (codecpar->extradata != NULL)
{
subtitle->extradata = malloc(codecpar->extradata_size);
subtitle->extradata = malloc(codecpar->extradata_size + 1);
memcpy(subtitle->extradata,
codecpar->extradata, codecpar->extradata_size);
subtitle->extradata_size = codecpar->extradata_size;
subtitle->extradata[codecpar->extradata_size] = 0;
subtitle->extradata_size = codecpar->extradata_size + 1;
}
if (st->disposition & AV_DISPOSITION_DEFAULT)
......
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