From: William A. Rowe Jr Date: Sat, 25 May 2002 20:09:24 +0000 (+0000) Subject: Simple fix for possibly unterminated REG_SZ data X-Git-Tag: 2.0.37~262 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=56f71e448c865a231bd2a5bab2f463eca45c1329;p=apache Simple fix for possibly unterminated REG_SZ data git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95286 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/winnt/registry.c b/server/mpm/winnt/registry.c index 0fe03b65cc..4b5b3261b0 100644 --- a/server/mpm/winnt/registry.c +++ b/server/mpm/winnt/registry.c @@ -211,7 +211,9 @@ apr_status_t ap_registry_get_value(apr_pool_t *p, const char *key, const char *n if (rv != ERROR_SUCCESS) return_error(rv); - *ppValue = apr_palloc(p, nSize); + *ppValue = apr_palloc(p, nSize + 1); + (*ppValue)[nSize] = '\0'; + rv = RegQueryValueEx(hKey, name, /* key name */ NULL, /* reserved */