]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* server/protocol.c (ap_rgetline_core): Fix off-by-one.
authorJoe Orton <jorton@apache.org>
Mon, 13 Sep 2004 15:34:59 +0000 (15:34 +0000)
committerJoe Orton <jorton@apache.org>
Mon, 13 Sep 2004 15:34:59 +0000 (15:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105113 13f79535-47bb-0310-9956-ffa450edef68

server/protocol.c

index cf62767e7fa5c8276d9db7334e98cd3456fee232..d3576c140544936315b7bbb4c7af2c987e41dbf2 100644 (file)
@@ -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';