diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-01-22 20:13:45 +0000 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-01-23 14:55:03 +0000 |
commit | 3a6dfec864d569c2d0a875e1a7466f51b00edb63 (patch) | |
tree | b75bb00d3326b6176b89320c7c6aae820d65aca8 | |
parent | 7915e6741dbe1cf3a8781cead3e68a7666de14f4 (diff) | |
download | ffmpeg-3a6dfec864d569c2d0a875e1a7466f51b00edb63.tar.gz |
segment: Check av_get_frame_filename() return value
CC: libav-stable@libav.org
Bug-Id: CID 1265713
-rw-r--r-- | libavformat/segment.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c index bcfd1f9973..824bbf7d5b 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); } |