aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2016-10-13 15:24:54 +0300
committerMartin Storsjö <martin@martin.st>2016-10-14 23:11:08 +0300
commit7395784ba72742b6daa62d35db4028e09f3fdf06 (patch)
tree2bbb80a70f7e6bc9c102c7137b8cf18f032ace0c /libavformat
parentc9527bf3444c5332fa04931d32997308784fc862 (diff)
downloadffmpeg-7395784ba72742b6daa62d35db4028e09f3fdf06.tar.gz
rtmpproto: Check the return from ff_amf_read_string
If this failed, we used to continue with an uninitialized filename buffer. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rtmpproto.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index e7e2479f04..64024259e2 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -1918,6 +1918,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, '/');