[PATCH] ntdll: Zero init reg_tzi in find_reg_tz_info().

Paul Gofman gofmanp at gmail.com
Mon Mar 9 13:54:23 CDT 2020

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48694

Zero init does not affect the search itself but the structure
is also copied to input / output variable and the application
seems to be unhappy with the random data beyond the end of

Signed-off-by: Paul Gofman <gofmanp at gmail.com>
 dlls/ntdll/time.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c
index 6926291bc2..a5af9f274d 100644
--- a/dlls/ntdll/time.c
+++ b/dlls/ntdll/time.c
@@ -797,6 +797,8 @@ static void find_reg_tz_info(RTL_DYNAMIC_TIME_ZONE_INFORMATION *tzi, const char*
         continue; \
+        memset(&reg_tzi, 0, sizeof(reg_tzi));
         if (!reg_query_value(hSubkey, mui_stdW, REG_SZ, reg_tzi.StandardName, sizeof(reg_tzi.StandardName)))
             get_value(hSubkey, stdW, REG_SZ, reg_tzi.StandardName, sizeof(reg_tzi.StandardName));
         if (!reg_query_value(hSubkey, mui_dltW, REG_SZ, reg_tzi.DaylightName, sizeof(reg_tzi.DaylightName)))

More information about the wine-devel mailing list