Commit 87dc8b3a authored by Justin Jacobs's avatar Justin Jacobs Committed by Michael Niedermayer

avformat/matroskadec: Check avpriv_new_chapter() for failure

Fixes null pointer dereference
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1ba7c6ea
......@@ -2161,8 +2161,10 @@ static int matroska_read_header(AVFormatContext *s)
(AVRational) { 1, 1000000000 },
chapters[i].start, chapters[i].end,
chapters[i].title);
av_dict_set(&chapters[i].chapter->metadata,
"title", chapters[i].title, 0);
if (chapters[i].chapter) {
av_dict_set(&chapters[i].chapter->metadata,
"title", chapters[i].title, 0);
}
max_start = chapters[i].start;
}
......
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