Rob Shearman : msi: Fix the buffer size calculation in msi_build_createsql_prelude.
Alexandre Julliard
julliard at winehq.org
Thu Feb 28 06:21:17 CST 2008
Module: wine
Branch: master
Commit: 03e466b8378685ade8c58392f946900279f63f75
URL: http://source.winehq.org/git/wine.git/?a=commit;h=03e466b8378685ade8c58392f946900279f63f75
Author: Rob Shearman <rob at codeweavers.com>
Date: Wed Feb 27 16:47:51 2008 +0000
msi: Fix the buffer size calculation in msi_build_createsql_prelude.
---
dlls/msi/database.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/database.c b/dlls/msi/database.c
index 425486e..bad40b8 100644
--- a/dlls/msi/database.c
+++ b/dlls/msi/database.c
@@ -348,7 +348,7 @@ static LPWSTR msi_build_createsql_prelude(LPWSTR table)
static const WCHAR create_fmt[] = {'C','R','E','A','T','E',' ','T','A','B','L','E',' ','`','%','s','`',' ','(',' ',0};
- size = sizeof(create_fmt) + lstrlenW(table) - 2;
+ size = sizeof(create_fmt)/sizeof(create_fmt[0]) + lstrlenW(table) - 2;
prelude = msi_alloc(size * sizeof(WCHAR));
if (!prelude)
return NULL;
More information about the wine-cvs
mailing list