[FFmpeg-cvslog] avformat/matroskadec: Check avpriv_new_chapter() for failure
Justin Jacobs
git at videolan.org
Sun Aug 17 15:31:42 CEST 2014
ffmpeg | branch: release/2.3 | Justin Jacobs <jajdorkster at gmail.com> | Wed Aug 6 20:04:38 2014 -0400| [59d98fc05078b7cb89b871dba84fce01c4e31067] | committer: Michael Niedermayer
avformat/matroskadec: Check avpriv_new_chapter() for failure
Fixes null pointer dereference
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 87dc8b3af9135f0cfcdf3c0520e3f29e7b0d92c6)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=59d98fc05078b7cb89b871dba84fce01c4e31067
---
libavformat/matroskadec.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index ec43526..fdfba57 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -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;
}
More information about the ffmpeg-cvslog
mailing list