diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-20 11:10:27 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-28 15:53:54 +0100 |
commit | cb88f428b32f37a77f88d864a79135b3c80c39ef (patch) | |
tree | 8e864eb629b3b7c4a06fe52afabd1eb0489c63d3 | |
parent | e0d53cbeef7c76d286328a1c9199ee95fabdca58 (diff) | |
download | ffmpeg-cb88f428b32f37a77f88d864a79135b3c80c39ef.tar.gz |
avformat/concat: Check protocol prefix
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8e32d014322eada1812af268d7ea9d53169d279c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/concat.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/concat.c b/libavformat/concat.c index 81fe97082c..7bcc27905e 100644 --- a/libavformat/concat.c +++ b/libavformat/concat.c @@ -65,7 +65,10 @@ static av_cold int concat_open(URLContext *h, const char *uri, int flags) struct concat_data *data = h->priv_data; struct concat_nodes *nodes; - av_strstart(uri, "concat:", &uri); + if (!av_strstart(uri, "concat:", &uri)) { + av_log(h, AV_LOG_ERROR, "URL %s lacks prefix\n", uri); + return AVERROR(EINVAL); + } for (i = 0, len = 1; uri[i]; i++) { if (uri[i] == *AV_CAT_SEPARATOR) { |