From cbe914c4728032228cdc255535564118a9455190 Mon Sep 17 00:00:00 2001 From: Felix Nawothnig Date: Wed, 6 Jul 2005 11:11:17 +0000 Subject: [PATCH] Clear buffer before querying the registry in SYSPARAMS_Load. --- dlls/user/sysparams.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/user/sysparams.c b/dlls/user/sysparams.c index 62b66367ce1..c86293f2eba 100644 --- a/dlls/user/sysparams.c +++ b/dlls/user/sysparams.c @@ -461,6 +461,7 @@ static BOOL SYSPARAMS_Load( LPCWSTR lpRegKey, LPCWSTR lpValName, LPWSTR lpBuf, D if ((RegOpenKeyW( get_volatile_regkey(), lpRegKey, &hKey ) == ERROR_SUCCESS) || (RegOpenKeyW( HKEY_CURRENT_USER, lpRegKey, &hKey ) == ERROR_SUCCESS)) { + memset( lpBuf, 0, count ); ret = !RegQueryValueExW( hKey, lpValName, NULL, &type, (LPBYTE)lpBuf, &count); RegCloseKey( hKey ); } -- 2.11.4.GIT