1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-04 06:08:26 +02:00

avcodec/dvdsub_parser: Init output buf/size

No testcase

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9e6c8437761661441d836876934314cb2b8fafe7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2018-07-13 18:54:48 +02:00
parent 03af6ab540
commit d25463c515

View File

@ -44,6 +44,9 @@ static int dvdsub_parse(AVCodecParserContext *s,
{ {
DVDSubParseContext *pc = s->priv_data; DVDSubParseContext *pc = s->priv_data;
*poutbuf = buf;
*poutbuf_size = buf_size;
if (pc->packet_index == 0) { if (pc->packet_index == 0) {
if (buf_size < 2 || AV_RB16(buf) && buf_size < 6) { if (buf_size < 2 || AV_RB16(buf) && buf_size < 6) {
if (buf_size) if (buf_size)