From: Joe Orton Date: Mon, 13 Sep 2004 15:34:59 +0000 (+0000) Subject: * server/protocol.c (ap_rgetline_core): Fix off-by-one. X-Git-Tag: 2.1.1~270 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d05865b144cdaeb8b7d9f10ae2bb38e2c4010067;p=thirdparty%2Fapache%2Fhttpd.git * server/protocol.c (ap_rgetline_core): Fix off-by-one. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105113 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/protocol.c b/server/protocol.c index cf62767e7fa..d3576c14054 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -254,7 +254,7 @@ AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n, if (*s) { /* ensure this string is terminated */ if (bytes_handled < n) { - (*s)[bytes_handled] = '\0'; + (*s)[bytes_handled-1] = '\0'; } else { (*s)[n-1] = '\0';