]> granicus.if.org Git - apache/commitdiff
Never trust Bill when he cuts and pastes
authorWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 2 Jul 2002 19:07:48 +0000 (19:07 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 2 Jul 2002 19:07:48 +0000 (19:07 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95938 13f79535-47bb-0310-9956-ffa450edef68

os/win32/ap_regkey.c

index c313a4490623e2f747b2872e9d70684f1f82ef0b..20b866caa6ebd6cbb48714bc47016e918241c555 100644 (file)
@@ -535,7 +535,7 @@ AP_DECLARE(apr_status_t) ap_regkey_value_array_get(apr_array_header_t **result,
          * or single NULL terminated.  Avert.
          */
         buf = (char *)value;
-        if (size < 2 || buf[size - 1] != '\0' || buf[size - 1] != '\0') {
+        if (size < 2 || buf[size - 1] != '\0' || buf[size - 2] != '\0') {
             buf = apr_palloc(pool, size + 2);
             memcpy(buf, value, size);
             buf[size + 1] = '\0';