Skip to content

Commit 484e828

Browse files
winesynclearn-more
authored andcommitted
[WINESYNC] msi/tests: Fix some format-overflow warnings.
Signed-off-by: Rémi Bernon <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id f961817710edd81b5d91bb7cb3f78975c307bfa2 by Rémi Bernon <[email protected]>
1 parent 98d8dda commit 484e828

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

modules/rostests/winetests/msi/action.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4626,7 +4626,7 @@ static void test_remove_files(void)
46264626
static void test_move_files(void)
46274627
{
46284628
UINT r;
4629-
char props[MAX_PATH];
4629+
char props[4 * MAX_PATH + 74];
46304630

46314631
if (is_process_limited())
46324632
{

modules/rostests/winetests/msi/install.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3816,7 +3816,7 @@ static void test_transformprop(void)
38163816
static void test_currentworkingdir(void)
38173817
{
38183818
UINT r;
3819-
CHAR drive[MAX_PATH], path[MAX_PATH];
3819+
CHAR drive[MAX_PATH], path[MAX_PATH + 12];
38203820
LPSTR ptr;
38213821

38223822
if (is_process_limited())
@@ -4778,7 +4778,7 @@ static void test_missingcomponent(void)
47784778
static void test_sourcedirprop(void)
47794779
{
47804780
UINT r;
4781-
CHAR props[MAX_PATH];
4781+
CHAR props[MAX_PATH + 18];
47824782

47834783
if (is_process_limited())
47844784
{
@@ -6112,7 +6112,7 @@ static void check_file_matches(const char *filename, const char *text)
61126112

61136113
static void test_deferred_action(void)
61146114
{
6115-
char path[200], file[200], buffer[200];
6115+
char path[200], file[200], buffer[211];
61166116
UINT r;
61176117

61186118
GetTempPathA(sizeof(path), path);

modules/rostests/winetests/msi/msi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ static UINT set_summary_info(MSIHANDLE hdb, LPSTR prodcode)
827827
static MSIHANDLE create_package_db(LPSTR prodcode)
828828
{
829829
MSIHANDLE hdb = 0;
830-
CHAR query[MAX_PATH];
830+
CHAR query[MAX_PATH + 72];
831831
UINT res;
832832

833833
DeleteFileA(msifile);

modules/rostests/winetests/msi/package.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ static void set_component_path(LPCSTR filename, MSIINSTALLCONTEXT context,
269269
WCHAR guidW[MAX_PATH];
270270
WCHAR squashedW[MAX_PATH];
271271
CHAR squashed[MAX_PATH];
272-
CHAR comppath[MAX_PATH];
272+
CHAR comppath[MAX_PATH + 81];
273273
CHAR prodpath[MAX_PATH];
274274
CHAR path[MAX_PATH];
275275
LPCSTR prod = NULL;
@@ -335,7 +335,7 @@ static void delete_component_path(LPCSTR guid, MSIINSTALLCONTEXT context, LPSTR
335335
WCHAR squashedW[MAX_PATH];
336336
WCHAR substrW[MAX_PATH];
337337
CHAR squashed[MAX_PATH];
338-
CHAR comppath[MAX_PATH];
338+
CHAR comppath[MAX_PATH + 81];
339339
CHAR prodpath[MAX_PATH];
340340
REGSAM access = KEY_ALL_ACCESS;
341341

@@ -1223,7 +1223,7 @@ static void query_file_path(MSIHANDLE hpkg, LPCSTR file, LPSTR buff)
12231223

12241224
static void test_settargetpath(void)
12251225
{
1226-
char tempdir[MAX_PATH+8], buffer[MAX_PATH], file[MAX_PATH];
1226+
char tempdir[MAX_PATH+8], buffer[MAX_PATH], file[MAX_PATH + 20];
12271227
DWORD sz;
12281228
MSIHANDLE hpkg;
12291229
UINT r;
@@ -2759,9 +2759,9 @@ static void test_formatrecord2(void)
27592759
static void test_formatrecord_tables(void)
27602760
{
27612761
MSIHANDLE hdb, hrec, hpkg = 0;
2762-
CHAR buf[MAX_PATH];
2762+
CHAR buf[MAX_PATH + 41];
27632763
CHAR curr_dir[MAX_PATH];
2764-
CHAR expected[MAX_PATH];
2764+
CHAR expected[MAX_PATH + 45];
27652765
CHAR root[MAX_PATH];
27662766
DWORD size;
27672767
UINT r;
@@ -4142,7 +4142,7 @@ static void test_appsearch(void)
41424142
static void test_appsearch_complocator(void)
41434143
{
41444144
MSIHANDLE hpkg, hdb;
4145-
char path[MAX_PATH], expected[MAX_PATH], prop[MAX_PATH];
4145+
char path[MAX_PATH + 15], expected[MAX_PATH], prop[MAX_PATH];
41464146
LPSTR usersid;
41474147
DWORD size;
41484148
UINT r;
@@ -4391,7 +4391,7 @@ static void test_appsearch_complocator(void)
43914391
static void test_appsearch_reglocator(void)
43924392
{
43934393
MSIHANDLE hpkg, hdb;
4394-
char path[MAX_PATH], expected[MAX_PATH], prop[MAX_PATH];
4394+
char path[MAX_PATH + 20], expected[MAX_PATH], prop[MAX_PATH];
43954395
DWORD binary[2], size, val;
43964396
BOOL space, version, is_64bit = sizeof(void *) > sizeof(int);
43974397
HKEY hklm, classes, hkcu, users;
@@ -4973,7 +4973,7 @@ static void delete_win_ini(LPCSTR file)
49734973
static void test_appsearch_inilocator(void)
49744974
{
49754975
MSIHANDLE hpkg, hdb;
4976-
char path[MAX_PATH], expected[MAX_PATH], prop[MAX_PATH];
4976+
char path[MAX_PATH + 14], expected[MAX_PATH], prop[MAX_PATH];
49774977
BOOL version;
49784978
LPSTR ptr;
49794979
DWORD size;
@@ -5210,7 +5210,7 @@ static void search_absolute_directory(LPSTR absolute, LPCSTR relative)
52105210
static void test_appsearch_drlocator(void)
52115211
{
52125212
MSIHANDLE hpkg, hdb;
5213-
char path[MAX_PATH], expected[MAX_PATH], prop[MAX_PATH];
5213+
char path[MAX_PATH + 27], expected[MAX_PATH], prop[MAX_PATH];
52145214
BOOL version;
52155215
DWORD size;
52165216
UINT r;
@@ -7968,7 +7968,7 @@ static void test_MsiGetProductProperty(void)
79687968
MSIHANDLE hprod, hdb;
79697969
CHAR val[MAX_PATH];
79707970
CHAR path[MAX_PATH];
7971-
CHAR query[MAX_PATH];
7971+
CHAR query[MAX_PATH + 17];
79727972
CHAR keypath[MAX_PATH*2];
79737973
CHAR prodcode[MAX_PATH];
79747974
WCHAR prodcodeW[MAX_PATH];

0 commit comments

Comments
 (0)