Rob Shearman : msi: Fix buffer size calculation in build_default_format.

Alexandre Julliard julliard at winehq.org
Thu Feb 28 06:21:17 CST 2008


Module: wine
Branch: master
Commit: 3183ad65d27d1ba4de255400277dfd46044d2ab8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3183ad65d27d1ba4de255400277dfd46044d2ab8

Author: Rob Shearman <rob at codeweavers.com>
Date:   Wed Feb 27 16:47:55 2008 +0000

msi: Fix buffer size calculation in build_default_format.

---

 dlls/msi/format.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/msi/format.c b/dlls/msi/format.c
index 8c5b246..f58f517 100644
--- a/dlls/msi/format.c
+++ b/dlls/msi/format.c
@@ -346,7 +346,7 @@ static LPWSTR build_default_format(const MSIRECORD* record)
         sprintfW(index, fmt_index, i);
         str = MSI_RecordGetString(record, i);
         len = (str) ? lstrlenW(str) : 0;
-        len += (sizeof(fmt_null) - 3) + lstrlenW(index);
+        len += (sizeof(fmt_null)/sizeof(fmt_null[0]) - 3) + lstrlenW(index);
         size += len;
 
         if (len > max_len)




More information about the wine-cvs mailing list