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
This commit is contained in:
Martin Storsjö 2010-05-24 19:23:31 +00:00
parent 9cc9a15510
commit c966c91279

View File

@ -2880,7 +2880,7 @@ static int rtsp_parse_request(HTTPContext *c)
if (*p == '\n') if (*p == '\n')
p++; p++;
while (*p != '\0') { while (*p != '\0') {
p1 = strchr(p, '\n'); p1 = memchr(p, '\n', (char *)c->buffer_ptr - p);
if (!p1) if (!p1)
break; break;
p2 = p1; p2 = p1;