提交 4f860848 编写于 作者: S Stephan Holljes 提交者: Nicolas George

lavf/http: Fix parsing http request data to not read over '\0'.

Signed-off-by: NStephan Holljes <klaxa1337@googlemail.com>
上级 94a4be85
......@@ -714,7 +714,7 @@ static int process_line(URLContext *h, char *line, int line_count,
if (s->is_connected_server) {
// HTTP method
method = p;
while (!av_isspace(*p))
while (*p && !av_isspace(*p))
p++;
*(p++) = '\0';
av_log(h, AV_LOG_TRACE, "Received method: %s\n", method);
......@@ -751,7 +751,7 @@ static int process_line(URLContext *h, char *line, int line_count,
while (av_isspace(*p))
p++;
version = p;
while (!av_isspace(*p))
while (*p && !av_isspace(*p))
p++;
*p = '\0';
if (av_strncasecmp(version, "HTTP/", 5)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册