]> git.sesse.net Git - ffmpeg/commitdiff
avformat/http: Fix Out-of-Bounds access in process_line()
authorWenxiang Qian <leonwxqian@qq.com>
Wed, 13 Feb 2019 07:54:08 +0000 (08:54 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 17 Feb 2019 09:29:42 +0000 (10:29 +0100)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/http.c

index a0a0636cf29553c3120e19e2865116a7f0d8310b..072a6ce0b92f408a1f0991a611847db0cac03162 100644 (file)
@@ -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);