Module: libav Branch: release/11 Commit: f1ea57769769040973c3d73425f118363d14b6e3
Author: Martin Storsjö <mar...@martin.st> Committer: Anton Khirnov <an...@khirnov.net> Date: Thu Oct 13 15:24:54 2016 +0300 rtmpproto: Check the return from ff_amf_read_string If this failed, we used to continue with an uninitialized filename buffer. CC: libav-sta...@libav.org Signed-off-by: Martin Storsjö <mar...@martin.st> (cherry picked from commit 7395784ba72742b6daa62d35db4028e09f3fdf06) Signed-off-by: Anton Khirnov <an...@khirnov.net> (cherry picked from commit 25da35dadade75526157dddf8637d43e34834b1e) Signed-off-by: Anton Khirnov <an...@khirnov.net> --- libavformat/rtmpproto.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 4aaa420..04db655 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -1884,6 +1884,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, '/'); _______________________________________________ libav-commits mailing list libav-commits@libav.org https://lists.libav.org/mailman/listinfo/libav-commits