From: Wilfried Göesgens Date: Wed, 18 Nov 2009 23:00:29 +0000 (+0000) Subject: * set correct buffer end pointer, so we don't run into unknown ground X-Git-Tag: v7.86~604 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=47b79a3ae2da5da98aa78f081e4a8889a5451a9f * set correct buffer end pointer, so we don't run into unknown ground --- 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);