diff mbox

[FFmpeg-devel,2/3] avformat/http: Fix Out-of-Bounds access in process_line()

Message ID 20190213093134.27979-2-michael@niedermayer.cc
State Accepted
Commit 85f91ed760a517c0d5fcf692d40a5a9d7efa9476
Headers show

Commit Message

Michael Niedermayer Feb. 13, 2019, 9:31 a.m. UTC
From: Wenxiang Qian <leonwxqian@qq.com>

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/http.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libavformat/http.c b/libavformat/http.c
index a0a0636cf2..072a6ce0b9 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -915,7 +915,7 @@  static int process_line(URLContext *h, char *line, int line_count,
             while (av_isspace(*p))
                 p++;
             resource = p;
-            while (!av_isspace(*p))
+            while (*p && !av_isspace(*p))
                 p++;
             *(p++) = '\0';
             av_log(h, AV_LOG_TRACE, "Requested resource: %s\n", resource);