[2/4] msi: Fix handling of an empty language id list in msi_parse_summary.
Hans Leidekker
hans at codeweavers.com
Wed Nov 17 03:57:40 CST 2010
See http://bugs.winehq.org/show_bug.cgi?id=25074
---
dlls/msi/package.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index 50a7dbb..72f3392 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -1336,9 +1336,14 @@ static UINT msi_parse_summary( MSISUMMARYINFO *si, MSIPACKAGE *package )
msi_free( template );
return ERROR_INSTALL_PLATFORM_UNSUPPORTED;
}
-
+ p++;
+ if (!*p)
+ {
+ msi_free( template );
+ return ERROR_SUCCESS;
+ }
count = 1;
- for (q = ++p; (q = strchrW( q, ',' )); q++) count++;
+ for (q = p; (q = strchrW( q, ',' )); q++) count++;
package->langids = msi_alloc( count * sizeof(LANGID) );
if (!package->langids)
--
1.7.1
More information about the wine-patches
mailing list