[FFmpeg-cvslog] lavf/http: Fix parsing http request data to not read over '\0'.
Stephan Holljes
git at videolan.org
Tue Aug 25 19:52:06 CEST 2015
ffmpeg | branch: master | Stephan Holljes <klaxa1337 at googlemail.com> | Thu Aug 20 18:01:56 2015 +0200| [4f860848abf1c6fedc6656acab8b34e424c289f0] | committer: Nicolas George
lavf/http: Fix parsing http request data to not read over '\0'.
Signed-off-by: Stephan Holljes <klaxa1337 at googlemail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4f860848abf1c6fedc6656acab8b34e424c289f0
---
libavformat/http.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/http.c b/libavformat/http.c
index 1eb716b..d3c0b7e 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -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)) {
More information about the ffmpeg-cvslog
mailing list