https://git.reactos.org/?p=reactos.git;a=commitdiff;h=484e828005ea4fffa8976…
commit 484e828005ea4fffa8976ed830105e5b17790974
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Mar 13 19:08:17 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:28:27 2022 +0100
[WINESYNC] msi/tests: Fix some format-overflow warnings.
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id f961817710edd81b5d91bb7cb3f78975c307bfa2 by Rémi Bernon
<rbernon(a)codeweavers.com>
---
modules/rostests/winetests/msi/action.c | 2 +-
modules/rostests/winetests/msi/install.c | 6 +++---
modules/rostests/winetests/msi/msi.c | 2 +-
modules/rostests/winetests/msi/package.c | 20 ++++++++++----------
4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/modules/rostests/winetests/msi/action.c
b/modules/rostests/winetests/msi/action.c
index 9d15c435ea3..cd4e2fd4c6c 100644
--- a/modules/rostests/winetests/msi/action.c
+++ b/modules/rostests/winetests/msi/action.c
@@ -4626,7 +4626,7 @@ error:
static void test_move_files(void)
{
UINT r;
- char props[MAX_PATH];
+ char props[4 * MAX_PATH + 74];
if (is_process_limited())
{
diff --git a/modules/rostests/winetests/msi/install.c
b/modules/rostests/winetests/msi/install.c
index f7fd83cfc08..99d53e56570 100644
--- a/modules/rostests/winetests/msi/install.c
+++ b/modules/rostests/winetests/msi/install.c
@@ -3816,7 +3816,7 @@ error:
static void test_currentworkingdir(void)
{
UINT r;
- CHAR drive[MAX_PATH], path[MAX_PATH];
+ CHAR drive[MAX_PATH], path[MAX_PATH + 12];
LPSTR ptr;
if (is_process_limited())
@@ -4778,7 +4778,7 @@ error:
static void test_sourcedirprop(void)
{
UINT r;
- CHAR props[MAX_PATH];
+ CHAR props[MAX_PATH + 18];
if (is_process_limited())
{
@@ -6112,7 +6112,7 @@ static void check_file_matches(const char *filename, const char
*text)
static void test_deferred_action(void)
{
- char path[200], file[200], buffer[200];
+ char path[200], file[200], buffer[211];
UINT r;
GetTempPathA(sizeof(path), path);
diff --git a/modules/rostests/winetests/msi/msi.c b/modules/rostests/winetests/msi/msi.c
index fbd1a7430fa..14d7ab1a2df 100644
--- a/modules/rostests/winetests/msi/msi.c
+++ b/modules/rostests/winetests/msi/msi.c
@@ -827,7 +827,7 @@ static UINT set_summary_info(MSIHANDLE hdb, LPSTR prodcode)
static MSIHANDLE create_package_db(LPSTR prodcode)
{
MSIHANDLE hdb = 0;
- CHAR query[MAX_PATH];
+ CHAR query[MAX_PATH + 72];
UINT res;
DeleteFileA(msifile);
diff --git a/modules/rostests/winetests/msi/package.c
b/modules/rostests/winetests/msi/package.c
index 3b7b11d81e4..bf83c116fff 100644
--- a/modules/rostests/winetests/msi/package.c
+++ b/modules/rostests/winetests/msi/package.c
@@ -269,7 +269,7 @@ static void set_component_path(LPCSTR filename, MSIINSTALLCONTEXT
context,
WCHAR guidW[MAX_PATH];
WCHAR squashedW[MAX_PATH];
CHAR squashed[MAX_PATH];
- CHAR comppath[MAX_PATH];
+ CHAR comppath[MAX_PATH + 81];
CHAR prodpath[MAX_PATH];
CHAR path[MAX_PATH];
LPCSTR prod = NULL;
@@ -335,7 +335,7 @@ static void delete_component_path(LPCSTR guid, MSIINSTALLCONTEXT
context, LPSTR
WCHAR squashedW[MAX_PATH];
WCHAR substrW[MAX_PATH];
CHAR squashed[MAX_PATH];
- CHAR comppath[MAX_PATH];
+ CHAR comppath[MAX_PATH + 81];
CHAR prodpath[MAX_PATH];
REGSAM access = KEY_ALL_ACCESS;
@@ -1223,7 +1223,7 @@ static void query_file_path(MSIHANDLE hpkg, LPCSTR file, LPSTR
buff)
static void test_settargetpath(void)
{
- char tempdir[MAX_PATH+8], buffer[MAX_PATH], file[MAX_PATH];
+ char tempdir[MAX_PATH+8], buffer[MAX_PATH], file[MAX_PATH + 20];
DWORD sz;
MSIHANDLE hpkg;
UINT r;
@@ -2759,9 +2759,9 @@ static void test_formatrecord2(void)
static void test_formatrecord_tables(void)
{
MSIHANDLE hdb, hrec, hpkg = 0;
- CHAR buf[MAX_PATH];
+ CHAR buf[MAX_PATH + 41];
CHAR curr_dir[MAX_PATH];
- CHAR expected[MAX_PATH];
+ CHAR expected[MAX_PATH + 45];
CHAR root[MAX_PATH];
DWORD size;
UINT r;
@@ -4142,7 +4142,7 @@ done:
static void test_appsearch_complocator(void)
{
MSIHANDLE hpkg, hdb;
- char path[MAX_PATH], expected[MAX_PATH], prop[MAX_PATH];
+ char path[MAX_PATH + 15], expected[MAX_PATH], prop[MAX_PATH];
LPSTR usersid;
DWORD size;
UINT r;
@@ -4391,7 +4391,7 @@ error:
static void test_appsearch_reglocator(void)
{
MSIHANDLE hpkg, hdb;
- char path[MAX_PATH], expected[MAX_PATH], prop[MAX_PATH];
+ char path[MAX_PATH + 20], expected[MAX_PATH], prop[MAX_PATH];
DWORD binary[2], size, val;
BOOL space, version, is_64bit = sizeof(void *) > sizeof(int);
HKEY hklm, classes, hkcu, users;
@@ -4973,7 +4973,7 @@ static void delete_win_ini(LPCSTR file)
static void test_appsearch_inilocator(void)
{
MSIHANDLE hpkg, hdb;
- char path[MAX_PATH], expected[MAX_PATH], prop[MAX_PATH];
+ char path[MAX_PATH + 14], expected[MAX_PATH], prop[MAX_PATH];
BOOL version;
LPSTR ptr;
DWORD size;
@@ -5210,7 +5210,7 @@ static void search_absolute_directory(LPSTR absolute, LPCSTR
relative)
static void test_appsearch_drlocator(void)
{
MSIHANDLE hpkg, hdb;
- char path[MAX_PATH], expected[MAX_PATH], prop[MAX_PATH];
+ char path[MAX_PATH + 27], expected[MAX_PATH], prop[MAX_PATH];
BOOL version;
DWORD size;
UINT r;
@@ -7968,7 +7968,7 @@ static void test_MsiGetProductProperty(void)
MSIHANDLE hprod, hdb;
CHAR val[MAX_PATH];
CHAR path[MAX_PATH];
- CHAR query[MAX_PATH];
+ CHAR query[MAX_PATH + 17];
CHAR keypath[MAX_PATH*2];
CHAR prodcode[MAX_PATH];
WCHAR prodcodeW[MAX_PATH];