提交 7395784b 编写于 作者: M Martin Storsjö

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: NMartin Storsjö <martin@martin.st>
上级 c9527bf3
......@@ -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, '/');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册