Signed-off-by: Torge Matthies tmatthies@codeweavers.com --- dlls/win32u/sysparams.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 114016954aa2..f905ac02f5ac 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -1259,7 +1259,8 @@ static BOOL update_display_cache_from_registry(void) sizeof(devicemap_video_keyW) ))) return FALSE;
- status = NtQueryKey( video_key, KeyFullInformation, &key, sizeof(key), &size ); + status = NtQueryKey( video_key, KeyFullInformation, &key, + offsetof(KEY_FULL_INFORMATION, Class), &size ); if (status && status != STATUS_BUFFER_OVERFLOW) return FALSE;
@@ -3191,7 +3192,7 @@ void sysparams_init(void)
if ((hkey = reg_open_key( config_key, software_fontsW, sizeof(software_fontsW) ))) { - char buffer[sizeof(KEY_VALUE_PARTIAL_INFORMATION) + sizeof(DWORD)]; + char buffer[offsetof(KEY_VALUE_PARTIAL_INFORMATION, Data) + sizeof(DWORD)]; KEY_VALUE_PARTIAL_INFORMATION *value = (void *)buffer;
if (query_reg_value( hkey, log_pixelsW, value, sizeof(buffer) ) && value->Type == REG_DWORD)