Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
c2b81e8d
Commit
c2b81e8d
authored
Feb 11, 2020
by
Rémi Bernon
Committed by
Alexandre Julliard
Feb 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Fix some format-overflow warnings.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cc012d13
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
32 deletions
+32
-32
actctx.c
dlls/kernel32/tests/actctx.c
+7
-7
path.c
dlls/kernel32/tests/path.c
+7
-7
process.c
dlls/kernel32/tests/process.c
+17
-17
toolhelp.c
dlls/kernel32/tests/toolhelp.c
+1
-1
No files found.
dlls/kernel32/tests/actctx.c
View file @
c2b81e8d
...
...
@@ -3207,9 +3207,9 @@ static void test_settings(void)
typedef
struct
{
char
path_tmp
[
MAX_PATH
];
char
path_dll
[
MAX_PATH
];
char
path_manifest_exe
[
MAX_PATH
];
char
path_manifest_dll
[
MAX_PATH
];
char
path_dll
[
MAX_PATH
+
11
];
char
path_manifest_exe
[
MAX_PATH
+
12
];
char
path_manifest_dll
[
MAX_PATH
+
16
];
ACTCTXA
context
;
ULONG_PTR
cookie
;
HANDLE
handle_context
;
...
...
@@ -3332,7 +3332,7 @@ cleanup1:
static
void
test_one_sxs_and_one_local_1
(
void
)
{
sxs_info
dll
;
char
path_dll_local
[
MAX_PATH
];
char
path_dll_local
[
MAX_PATH
+
11
];
char
path_application
[
MAX_PATH
];
HMODULE
module
=
NULL
;
char
path1
[
MAX_PATH
],
path2
[
MAX_PATH
];
...
...
@@ -3372,7 +3372,7 @@ cleanup:
static
void
test_one_sxs_and_one_local_2
(
void
)
{
sxs_info
dll
;
char
path_dll_local
[
MAX_PATH
];
char
path_dll_local
[
MAX_PATH
+
11
];
char
path_application
[
MAX_PATH
];
HMODULE
module
=
NULL
;
char
path1
[
MAX_PATH
],
path2
[
MAX_PATH
];
...
...
@@ -3413,7 +3413,7 @@ cleanup:
static
void
test_one_with_sxs_and_GetModuleHandleA
(
void
)
{
sxs_info
dll
;
char
path_dll_local
[
MAX_PATH
];
char
path_dll_local
[
MAX_PATH
+
11
];
char
path_tmp
[
MAX_PATH
];
HMODULE
module
=
NULL
,
module_temp
;
BOOL
success
;
...
...
@@ -3451,7 +3451,7 @@ cleanup:
static
void
test_builtin_sxs
(
void
)
{
char
path_manifest
[
MAX_PATH
];
char
path_manifest
[
MAX_PATH
+
12
];
char
path_tmp
[
MAX_PATH
];
HMODULE
module_msvcp
=
0
,
module_msvcr
=
0
;
char
path_msvcp
[
MAX_PATH
],
path_msvcr
[
MAX_PATH
];
...
...
dlls/kernel32/tests/path.c
View file @
c2b81e8d
...
...
@@ -108,10 +108,10 @@ static void test_ValidPathA(const CHAR *curdir, const CHAR *subdir, const CHAR *
CHAR
*
shortstr
,
SLpassfail
*
passfail
,
const
CHAR
*
errstr
)
{
CHAR
tmpstr
[
MAX_PATH
],
fullpath
[
MAX_PATH
],
/*full path to the file (not short/long) */
fullpath
[
MAX_PATH
+
1
],
/*full path to the file (not short/long) */
subpath
[
MAX_PATH
],
/*relative path to the file */
fullpathshort
[
MAX_PATH
],
/*absolute path to the file (short format) */
fullpathlong
[
MAX_PATH
],
/*absolute path to the file (long format) */
fullpathshort
[
2
*
MAX_PATH
],
/*absolute path to the file (short format) */
fullpathlong
[
2
*
MAX_PATH
],
/*absolute path to the file (long format) */
curdirshort
[
MAX_PATH
],
/*absolute path to the current dir (short) */
curdirlong
[
MAX_PATH
];
/*absolute path to the current dir (long) */
LPSTR
strptr
;
/*ptr to the filename portion of the path */
...
...
@@ -333,7 +333,7 @@ static void test_InitPathA(CHAR *newdir, CHAR *curDrive, CHAR *otherDrive)
CHAR
tmppath
[
MAX_PATH
],
/*path to TEMP */
tmpstr
[
MAX_PATH
],
tmpstr1
[
MAX_PATH
],
invalid_dir
[
MAX_PATH
];
invalid_dir
[
MAX_PATH
+
29
];
DWORD
len
,
len1
,
drives
;
INT
id
;
...
...
@@ -557,7 +557,7 @@ static void test_CurrentDirectoryA(CHAR *origdir, CHAR *newdir)
/* Cleanup the mess we made while executing these tests */
static
void
test_CleanupPathA
(
CHAR
*
origdir
,
CHAR
*
curdir
)
{
CHAR
tmpstr
[
MAX_PATH
];
CHAR
tmpstr
[
MAX_PATH
+
35
];
sprintf
(
tmpstr
,
"%s
\\
%s
\\
%s"
,
curdir
,
SHORTDIR
,
SHORTFILE
);
ok
(
DeleteFileA
(
tmpstr
),
"DeleteFileA failed
\n
"
);
sprintf
(
tmpstr
,
"%s
\\
%s
\\
%s"
,
curdir
,
SHORTDIR
,
LONGFILE
);
...
...
@@ -602,7 +602,7 @@ static void test_PathNameA(CHAR *curdir, CHAR curDrive, CHAR otherDrive)
{
CHAR
curdir_short
[
MAX_PATH
],
longdir_short
[
MAX_PATH
];
CHAR
tmpstr
[
MAX_PATH
],
tmpstr1
[
MAX_PATH
],
tmpstr2
[
MAX_PATH
];
CHAR
tmpstr
[
MAX_PATH
+
15
],
tmpstr1
[
MAX_PATH
+
22
],
tmpstr2
[
2
*
MAX_PATH
+
15
];
LPSTR
strptr
;
/*ptr to the filename portion of the path */
DWORD
len
;
INT
i
;
...
...
@@ -1780,7 +1780,7 @@ static void test_SearchPathA(void)
static
const
CHAR
testdeprelA
[]
=
"./testdep.dll"
;
static
const
CHAR
kernel32A
[]
=
"kernel32.dll"
;
static
const
CHAR
fileA
[]
=
""
;
CHAR
pathA
[
MAX_PATH
],
buffA
[
MAX_PATH
],
path2A
[
MAX_PATH
],
path3A
[
MAX_PATH
],
curdirA
[
MAX_PATH
];
CHAR
pathA
[
MAX_PATH
+
13
],
buffA
[
MAX_PATH
],
path2A
[
MAX_PATH
],
path3A
[
MAX_PATH
+
13
],
curdirA
[
MAX_PATH
];
CHAR
tmpdirA
[
MAX_PATH
],
*
ptrA
=
NULL
;
ULONG_PTR
cookie
;
HANDLE
handle
;
...
...
dlls/kernel32/tests/process.c
View file @
c2b81e8d
...
...
@@ -598,7 +598,7 @@ static void ok_child_int( int line, const char *sect, const char *key, UINT expe
static
void
test_Startup
(
void
)
{
char
buffer
[
MAX_PATH
];
char
buffer
[
2
*
MAX_PATH
+
25
];
PROCESS_INFORMATION
info
;
STARTUPINFOA
startup
,
si
;
char
*
result
;
...
...
@@ -884,8 +884,8 @@ static void test_Startup(void)
static
void
test_CommandLine
(
void
)
{
char
buffer
[
MAX_PATH
],
fullpath
[
MAX_PATH
],
*
lpFilePart
,
*
p
;
char
buffer2
[
MAX_PATH
];
char
buffer
[
2
*
MAX_PATH
+
65
],
fullpath
[
MAX_PATH
],
*
lpFilePart
,
*
p
;
char
buffer2
[
MAX_PATH
+
44
];
PROCESS_INFORMATION
info
;
STARTUPINFOA
startup
;
BOOL
ret
;
...
...
@@ -1093,7 +1093,7 @@ static void test_CommandLine(void)
static
void
test_Directory
(
void
)
{
char
buffer
[
MAX_PATH
];
char
buffer
[
2
*
MAX_PATH
+
25
];
PROCESS_INFORMATION
info
;
STARTUPINFOA
startup
;
char
windir
[
MAX_PATH
];
...
...
@@ -1137,7 +1137,7 @@ static void test_Directory(void)
static
void
test_Toolhelp
(
void
)
{
char
buffer
[
MAX_PATH
];
char
buffer
[
2
*
MAX_PATH
+
27
];
STARTUPINFOA
startup
;
PROCESS_INFORMATION
info
;
HANDLE
process
,
thread
,
snapshot
;
...
...
@@ -1306,7 +1306,7 @@ static void cmpEnvironment(const char* gesA)
static
void
test_Environment
(
void
)
{
char
buffer
[
MAX_PATH
];
char
buffer
[
2
*
MAX_PATH
+
25
];
PROCESS_INFORMATION
info
;
STARTUPINFOA
startup
;
char
*
child_env
;
...
...
@@ -1397,7 +1397,7 @@ static void test_Environment(void)
static
void
test_SuspendFlag
(
void
)
{
char
buffer
[
MAX_PATH
];
char
buffer
[
2
*
MAX_PATH
+
25
];
PROCESS_INFORMATION
info
;
STARTUPINFOA
startup
,
us
;
DWORD
exit_status
;
...
...
@@ -1445,7 +1445,7 @@ static void test_SuspendFlag(void)
static
void
test_DebuggingFlag
(
void
)
{
char
buffer
[
MAX_PATH
];
char
buffer
[
2
*
MAX_PATH
+
25
];
void
*
processbase
=
NULL
;
PROCESS_INFORMATION
info
;
STARTUPINFOA
startup
,
us
;
...
...
@@ -1512,7 +1512,7 @@ static BOOL is_console(HANDLE h)
static
void
test_Console
(
void
)
{
char
buffer
[
MAX_PATH
];
char
buffer
[
2
*
MAX_PATH
+
35
];
PROCESS_INFORMATION
info
;
STARTUPINFOA
startup
,
us
;
SECURITY_ATTRIBUTES
sa
;
...
...
@@ -1700,7 +1700,7 @@ static void test_Console(void)
static
void
test_ExitCode
(
void
)
{
char
buffer
[
MAX_PATH
];
char
buffer
[
2
*
MAX_PATH
+
35
];
PROCESS_INFORMATION
info
;
STARTUPINFOA
startup
;
DWORD
code
;
...
...
@@ -2415,7 +2415,7 @@ static void _test_completion(int line, HANDLE port, DWORD ekey, ULONG_PTR evalue
static
void
_create_process
(
int
line
,
const
char
*
command
,
LPPROCESS_INFORMATION
pi
)
{
BOOL
ret
;
char
buffer
[
MAX_PATH
];
char
buffer
[
MAX_PATH
+
19
];
STARTUPINFOA
si
=
{
0
};
sprintf
(
buffer
,
"
\"
%s
\"
tests/process.c %s"
,
selfname
,
command
);
...
...
@@ -2830,7 +2830,7 @@ static HANDLE test_AddSelfToJob(void)
static
void
test_jobInheritance
(
HANDLE
job
)
{
char
buffer
[
MAX_PATH
];
char
buffer
[
MAX_PATH
+
23
];
PROCESS_INFORMATION
pi
;
STARTUPINFOA
si
=
{
0
};
DWORD
dwret
;
...
...
@@ -2864,7 +2864,7 @@ static void test_BreakawayOk(HANDLE job)
JOBOBJECT_EXTENDED_LIMIT_INFORMATION
limit_info
;
PROCESS_INFORMATION
pi
;
STARTUPINFOA
si
=
{
0
};
char
buffer
[
MAX_PATH
];
char
buffer
[
MAX_PATH
+
23
];
BOOL
ret
,
out
;
DWORD
dwret
;
...
...
@@ -2934,7 +2934,7 @@ static void test_BreakawayOk(HANDLE job)
static
void
test_StartupNoConsole
(
void
)
{
#ifndef _WIN64
char
buffer
[
MAX_PATH
];
char
buffer
[
2
*
MAX_PATH
+
25
];
STARTUPINFOA
startup
;
PROCESS_INFORMATION
info
;
...
...
@@ -2962,7 +2962,7 @@ static void test_StartupNoConsole(void)
static
void
test_DetachConsoleHandles
(
void
)
{
#ifndef _WIN64
char
buffer
[
MAX_PATH
];
char
buffer
[
2
*
MAX_PATH
+
25
];
STARTUPINFOA
startup
;
PROCESS_INFORMATION
info
;
UINT
result
;
...
...
@@ -3385,7 +3385,7 @@ static void test_SuspendProcessState(void)
static
void
test_DetachStdHandles
(
void
)
{
#ifndef _WIN64
char
buffer
[
MAX_PATH
],
tempfile
[
MAX_PATH
];
char
buffer
[
2
*
MAX_PATH
+
25
],
tempfile
[
MAX_PATH
];
STARTUPINFOA
startup
;
PROCESS_INFORMATION
info
;
HANDLE
hstdin
,
hstdout
,
hstderr
,
htemp
;
...
...
@@ -4034,7 +4034,7 @@ START_TEST(process)
}
else
if
(
!
strcmp
(
myARGV
[
2
],
"nested"
)
&&
myARGC
>=
4
)
{
char
buffer
[
MAX_PATH
];
char
buffer
[
MAX_PATH
+
26
];
STARTUPINFOA
startup
;
PROCESS_INFORMATION
info
;
...
...
dlls/kernel32/tests/toolhelp.c
View file @
c2b81e8d
...
...
@@ -284,7 +284,7 @@ START_TEST(toolhelp)
DWORD
pid
=
GetCurrentProcessId
();
int
r
;
char
*
p
,
module
[
MAX_PATH
];
char
buffer
[
MAX_PATH
];
char
buffer
[
MAX_PATH
+
21
];
SECURITY_ATTRIBUTES
sa
;
PROCESS_INFORMATION
info
;
STARTUPINFOA
startup
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment