Commit 7395784b authored by Martin Storsjö's avatar 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: 's avatarMartin Storsjö <martin@martin.st>
parent 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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment