Module: libav Branch: release/11 Commit: 21b21aed797b5e636adcf2df811f96a95f208930
Author: Andreas Cadhalpun <[email protected]> Committer: Vittorio Giovara <[email protected]> Date: Tue Apr 28 20:57:59 2015 +0200 nut: Check chapter creation in decode_info_header This fixes a segmentation fault when accessing the metadata. Signed-off-by: Luca Barbato <[email protected]> CC: [email protected] --- libavformat/nutdec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 36ca754..116c3d4 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -482,6 +482,10 @@ static int decode_info_header(NUTContext *nut) nut->time_base[chapter_start % nut->time_base_count], start, start + chapter_len, NULL); + if (!chapter) { + av_log(s, AV_LOG_ERROR, "Could not create chapter.\n"); + return AVERROR(ENOMEM); + } metadata = &chapter->metadata; } else if (stream_id_plus1) { st = s->streams[stream_id_plus1 - 1]; _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
