diff options
author | Clément Bœsch <u@pkh.me> | 2017-03-23 16:34:19 +0100 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2017-03-23 16:34:19 +0100 |
commit | 36fcbc00765aa9f5e89c10bdeab744ecae153f37 (patch) | |
tree | 855b1836d9b2c095fea08dd07bf2564eabc361d3 /libavformat | |
parent | e7329c0fd55cc88f7b78b842a8bce201f0e49fdb (diff) | |
parent | 7395784ba72742b6daa62d35db4028e09f3fdf06 (diff) | |
download | ffmpeg-36fcbc00765aa9f5e89c10bdeab744ecae153f37.tar.gz |
Merge commit '7395784ba72742b6daa62d35db4028e09f3fdf06'
* commit '7395784ba72742b6daa62d35db4028e09f3fdf06':
rtmpproto: Check the return from ff_amf_read_string
Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rtmpproto.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 7b2bd81bd1..c0e2df447e 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -1953,6 +1953,13 @@ static int send_invoke_response(URLContext *s, RTMPPacket *pkt) !strcmp(command, "publish")) { ret = ff_amf_read_string(&gbc, filename, sizeof(filename), &stringlen); + if (ret) { + if (ret == AVERROR(EINVAL)) + av_log(s, AV_LOG_ERROR, "Unable to parse stream name - name too long?\n"); + else + av_log(s, AV_LOG_ERROR, "Unable to parse stream name\n"); + return ret; + } // check with url if (s->filename) { pchar = strrchr(s->filename, '/'); |