If this failed, we used to continue with an uninitialized
filename buffer.

CC: libav-sta...@libav.org
---
 libavformat/rtmpproto.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index e7e2479..6402425 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, '/');
-- 
2.8.4 (Apple Git-73)

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to