From: William A. Rowe Jr Date: Tue, 2 Jul 2002 19:07:48 +0000 (+0000) Subject: Never trust Bill when he cuts and pastes X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b1d4568c98b9ac201011c92b0a5111f12128f71;p=apache Never trust Bill when he cuts and pastes git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95938 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/os/win32/ap_regkey.c b/os/win32/ap_regkey.c index c313a44906..20b866caa6 100644 --- a/os/win32/ap_regkey.c +++ b/os/win32/ap_regkey.c @@ -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';