[MSI] Apply Wine commit fdac39f by Hans Leidekker: Pass correct length to GetDateForm...
authorAmine Khaldi <amine.khaldi@reactos.org>
Fri, 20 Oct 2017 17:40:15 +0000 (18:40 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sat, 21 Oct 2017 10:45:18 +0000 (11:45 +0100)
dll/win32/msi/package.c

index e2c3834..3e0ae71 100644 (file)
@@ -2289,7 +2289,7 @@ static MSIRECORD *msi_get_property_row( MSIDATABASE *db, LPCWSTR name )
         if (!length)
             return NULL;
         buffer = msi_alloc(length * sizeof(WCHAR));
-        GetDateFormatW(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, buffer, sizeof(WCHAR));
+        GetDateFormatW(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, buffer, length);
 
         row = MSI_CreateRecord(1);
         if (!row)
@@ -2304,7 +2304,7 @@ static MSIRECORD *msi_get_property_row( MSIDATABASE *db, LPCWSTR name )
         if (!length)
             return NULL;
         buffer = msi_alloc(length * sizeof(WCHAR));
-        GetTimeFormatW(LOCALE_USER_DEFAULT, TIME_NOTIMEMARKER, NULL, NULL, buffer, sizeof(WCHAR));
+        GetTimeFormatW(LOCALE_USER_DEFAULT, TIME_NOTIMEMARKER, NULL, NULL, buffer, length);
 
         row = MSI_CreateRecord(1);
         if (!row)