From: Brian Pane Date: Wed, 5 Dec 2001 01:34:00 +0000 (+0000) Subject: Fixed check for buffer overrun in ap_rgetline() X-Git-Tag: 2.0.30~290 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a88efbd99f9ddec48a8a55d6c337c51b50df3867;p=thirdparty%2Fapache%2Fhttpd.git Fixed check for buffer overrun in ap_rgetline() git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92324 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/protocol.c b/server/protocol.c index 94009014250..f71d7dfb677 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -257,7 +257,7 @@ AP_DECLARE(int) ap_rgetline(char **s, int n, request_rec *r, int fold) AP_DEBUG_ASSERT(!APR_BRIGADE_EMPTY(req_cfg->bb)); break; } - if (length - 1 < n) { + if (total + length - 1 < n) { if (!*s) { *s = apr_palloc(r->pool, length + 2); /* +2 for LF, null */ }