From a605ae9359904bb2299c62ec50a4a687778623f3 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 4 Dec 2015 11:02:13 +0100 Subject: [PATCH] msidb-Implementation: Pass correct size argument to snprintfW (Thanks Amine Khaldi). --- ...-support-for-exporting-binary-streams-Binary-.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/patches/msidb-Implementation/0012-msi-Add-support-for-exporting-binary-streams-Binary-.patch b/patches/msidb-Implementation/0012-msi-Add-support-for-exporting-binary-streams-Binary-.patch index 88a8766b..a219248c 100644 --- a/patches/msidb-Implementation/0012-msi-Add-support-for-exporting-binary-streams-Binary-.patch +++ b/patches/msidb-Implementation/0012-msi-Add-support-for-exporting-binary-streams-Binary-.patch @@ -1,4 +1,4 @@ -From fdb59c20c2b04b0c5c405b0926f785efaaa2b174 Mon Sep 17 00:00:00 2001 +From cde86309c43cf9ebd9ff1e6c12869cdf34ede607 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Fri, 18 Sep 2015 11:07:43 -0600 Subject: msi: Add support for exporting binary streams (Binary/Icon tables). @@ -9,7 +9,7 @@ Signed-off-by: Erich E. Hoover 1 file changed, 79 insertions(+), 6 deletions(-) diff --git a/dlls/msi/database.c b/dlls/msi/database.c -index 7c511c9..464b2d4 100644 +index 7c511c9..6627fd0 100644 --- a/dlls/msi/database.c +++ b/dlls/msi/database.c @@ -53,6 +53,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi); @@ -49,7 +49,7 @@ index 7c511c9..464b2d4 100644 + return r; + + /* if the destination folder does not exist then create it (folder name = table name) */ -+ snprintfW( stream_filename, sizeof(stream_filename), fmt_folder, folder, table ); ++ snprintfW( stream_filename, sizeof(stream_filename)/sizeof(WCHAR), fmt_folder, folder, table ); + if (GetFileAttributesW( stream_filename ) == INVALID_FILE_ATTRIBUTES) + { + if (!CreateDirectoryW( stream_filename, NULL )) @@ -57,7 +57,7 @@ index 7c511c9..464b2d4 100644 + } + + /* actually create the file */ -+ snprintfW( stream_filename, sizeof(stream_filename), fmt_file, folder, table, stream_name ); ++ snprintfW( stream_filename, sizeof(stream_filename)/sizeof(WCHAR), fmt_file, folder, table, stream_name ); + file = CreateFileW( stream_filename, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL ); + if (file == INVALID_HANDLE_VALUE) @@ -149,5 +149,5 @@ index 7c511c9..464b2d4 100644 } -- -2.5.1 +2.6.2