From d05865b144cdaeb8b7d9f10ae2bb38e2c4010067 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Mon, 13 Sep 2004 15:34:59 +0000 Subject: [PATCH] * 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 --- server/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'; -- 2.47.2