Module: libav Branch: master Commit: 3a6dfec864d569c2d0a875e1a7466f51b00edb63
Author: Vittorio Giovara <[email protected]> Committer: Vittorio Giovara <[email protected]> Date: Thu Jan 22 20:13:45 2015 +0000 segment: Check av_get_frame_filename() return value CC: [email protected] Bug-Id: CID 1265713 --- libavformat/segment.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/segment.c b/libavformat/segment.c index bcfd1f9..824bbf7 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -105,7 +105,11 @@ static int segment_hls_window(AVFormatContext *s, int last) if (seg->entry_prefix) { avio_printf(seg->pb, "%s", seg->entry_prefix); } - av_get_frame_filename(buf, sizeof(buf), s->filename, i); + ret = av_get_frame_filename(buf, sizeof(buf), s->filename, i); + if (ret < 0) { + ret = AVERROR(EINVAL); + goto fail; + } avio_printf(seg->pb, "%s\n", buf); } _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
