From c966c91279f8bca0f1d4865779519b077a2221f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st> Date: Mon, 24 May 2010 19:23:31 +0000 Subject: [PATCH] ffserver: Fix an out of bounds read Fix by Howard Chu, hyc at highlandsun dot com Originally committed as revision 23292 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffserver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffserver.c b/ffserver.c index 42177350779..e3b53fb7ef5 100644 --- a/ffserver.c +++ b/ffserver.c @@ -2880,7 +2880,7 @@ static int rtsp_parse_request(HTTPContext *c) if (*p == '\n') p++; while (*p != '\0') { - p1 = strchr(p, '\n'); + p1 = memchr(p, '\n', (char *)c->buffer_ptr - p); if (!p1) break; p2 = p1; -- GitLab