Rémi Bernon : msi/tests: Fix some format-overflow warnings.
Alexandre Julliard
julliard at winehq.org
Sun Feb 16 15:23:58 CST 2020
Module: wine
Branch: master
Commit: f961817710edd81b5d91bb7cb3f78975c307bfa2
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f961817710edd81b5d91bb7cb3f78975c307bfa2
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Tue Feb 11 19:09:28 2020 +0100
msi/tests: Fix some format-overflow warnings.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msi/tests/action.c | 2 +-
dlls/msi/tests/install.c | 6 +++---
dlls/msi/tests/msi.c | 2 +-
dlls/msi/tests/package.c | 20 ++++++++++----------
4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index 89706249e4..48866e36f4 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/action.c
@@ -4623,7 +4623,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/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index f7fd83cfc0..99d53e5657 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/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/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c
index 39a6638118..eb547c98dc 100644
--- a/dlls/msi/tests/msi.c
+++ b/dlls/msi/tests/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/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index 3b7b11d81e..bf83c116ff 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/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];
More information about the wine-cvs
mailing list