mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-30 22:00:51 +08:00
avformat/matroskadec: Check avpriv_new_chapter() for failure
Fixes null pointer dereference
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 87dc8b3af9)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
60bfa9154d
commit
59d98fc050
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user