aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWenxiang Qian <leonwxqian@qq.com>2019-02-13 08:54:08 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2019-03-14 00:24:44 +0100
commitec22b46a4d34e8d01a2bb69335680c2d84fb26b9 (patch)
treeee7a86fc3594e007c9af42aacdfb995bc1cf3ed8
parent11375cd1014766c50fb6f36344096f3714569fb3 (diff)
downloadffmpeg-ec22b46a4d34e8d01a2bb69335680c2d84fb26b9.tar.gz
avformat/http: Fix Out-of-Bounds access in process_line()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 85f91ed760a517c0d5fcf692d40a5a9d7efa9476) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index 3a35bc7eac..8cd84aa3fb 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);