Author: hbelusca
Date: Sat May 28 15:23:00 2016
New Revision: 71435
URL:
http://svn.reactos.org/svn/reactos?rev=71435&view=rev
Log:
[TIMEDATE.CPL]: Do not hardcode some of the buffer lengths.
CORE-11284
Modified:
trunk/reactos/dll/cpl/timedate/timezone.c
Modified: trunk/reactos/dll/cpl/timedate/timezone.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/timezone.…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/timezone.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/timedate/timezone.c [iso-8859-1] Sat May 28 15:23:00 2016
@@ -73,7 +73,7 @@
DWORD dwValueSize;
LONG lError;
- dwValueSize = 128 * sizeof(WCHAR);
+ dwValueSize = sizeof(Entry->Description);
lError = RegQueryValueExW(hZoneKey,
L"Display",
NULL,
@@ -83,7 +83,7 @@
if (lError != ERROR_SUCCESS)
return lError;
- dwValueSize = 33 * sizeof(WCHAR);
+ dwValueSize = sizeof(Entry->StandardName);
lError = RegQueryValueExW(hZoneKey,
L"Std",
NULL,
@@ -93,7 +93,7 @@
if (lError != ERROR_SUCCESS)
return lError;
- dwValueSize = 33 * sizeof(WCHAR);
+ dwValueSize = sizeof(Entry->DaylightName);
lError = RegQueryValueExW(hZoneKey,
L"Dlt",
NULL,
@@ -103,7 +103,7 @@
if (lError != ERROR_SUCCESS)
return lError;
- dwValueSize = sizeof(TZ_INFO);
+ dwValueSize = sizeof(Entry->TimezoneInfo);
lError = RegQueryValueExW(hZoneKey,
L"TZI",
NULL,
@@ -371,7 +371,7 @@
0,
REG_DWORD,
(LPBYTE)&dwValue,
- sizeof(DWORD));
+ sizeof(dwValue));
}
else
{
@@ -401,7 +401,7 @@
hBitmap = LoadImageW(hApplet, MAKEINTRESOURCEW(IDC_WORLD), IMAGE_BITMAP, 0,
0, LR_DEFAULTCOLOR);
if (hBitmap != NULL)
{
- GetObjectW(hBitmap, sizeof(BITMAP), &bitmap);
+ GetObjectW(hBitmap, sizeof(bitmap), &bitmap);
cxSource = bitmap.bmWidth;
cySource = bitmap.bmHeight;