[USER32] Zero out buffer in SYSPARAMS_Load (resend)

Felix Nawothnig felix.nawothnig at t-online.de
Tue Jul 5 23:04:53 CDT 2005


Oops, this time without XP colors (they _are_ prettier :).

ChangeLog:
Clear buffer before querying the registry in SYSPARAMS_Load.
-------------- next part --------------
Index: sysparams.c
===================================================================
RCS file: /home/wine/wine/dlls/user/sysparams.c,v
retrieving revision 1.26
diff -u -r1.26 sysparams.c
--- sysparams.c	5 Jul 2005 10:55:44 -0000	1.26
+++ sysparams.c	6 Jul 2005 04:02:32 -0000
@@ -461,6 +461,7 @@
     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 );
     }


More information about the wine-patches mailing list