From 423319d1575a6168b57d2fa152566beccf717c97 Mon Sep 17 00:00:00 2001 From: Wenxiang Qian Date: Wed, 13 Feb 2019 08:54:08 +0100 Subject: [PATCH] avformat/http: Fix Out-of-Bounds access in process_line() Signed-off-by: Michael Niedermayer (cherry picked from commit 85f91ed760a517c0d5fcf692d40a5a9d7efa9476) Signed-off-by: Michael Niedermayer --- libavformat/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/http.c b/libavformat/http.c index a64ad693e1..769da5d170 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -744,7 +744,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);