From 47b79a3ae2da5da98aa78f081e4a8889a5451a9f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Wed, 18 Nov 2009 23:00:29 +0000 Subject: [PATCH] * set correct buffer end pointer, so we don't run into unknown ground --- webcit/context_loop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webcit/context_loop.c b/webcit/context_loop.c index 43adf38dd..e0577d7eb 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -411,9 +411,10 @@ int ReadHTTPRequest (ParsedHttpHdrs *Hdr) StrBufExtract_token(HeaderName, Line, 0, ':'); pchs = ChrPtr(Line); + pche = pchs + StrLength(Line); pch = pchs + StrLength(HeaderName) + 1; pche = pchs + StrLength(Line); - while (isspace(*pch) && (pch < pche)) + while ((pch < pche) && isspace(*pch)) pch ++; StrBufCutLeft(Line, pch - pchs); -- 2.30.2