mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 13:23:38 +00:00
psapi/tests: Use MAX_PATH size for arrays holding file paths.
This commit is contained in:
parent
fb5cfacce5
commit
b1f603d8bc
|
@ -76,7 +76,7 @@ static void test_EnumProcesses(void)
|
||||||
|
|
||||||
static void test_EnumProcessModules(void)
|
static void test_EnumProcessModules(void)
|
||||||
{
|
{
|
||||||
char buffer[200] = "C:\\windows\\system32\\msinfo32.exe";
|
char buffer[MAX_PATH] = "C:\\windows\\system32\\msinfo32.exe";
|
||||||
PROCESS_INFORMATION pi = {0};
|
PROCESS_INFORMATION pi = {0};
|
||||||
STARTUPINFOA si = {0};
|
STARTUPINFOA si = {0};
|
||||||
void *cookie;
|
void *cookie;
|
||||||
|
@ -140,7 +140,7 @@ static void test_EnumProcessModules(void)
|
||||||
if (sizeof(void *) == 8)
|
if (sizeof(void *) == 8)
|
||||||
{
|
{
|
||||||
MODULEINFO info;
|
MODULEINFO info;
|
||||||
char name[40];
|
char name[MAX_PATH];
|
||||||
HMODULE hmods[3];
|
HMODULE hmods[3];
|
||||||
|
|
||||||
strcpy(buffer, "C:\\windows\\syswow64\\msinfo32.exe");
|
strcpy(buffer, "C:\\windows\\syswow64\\msinfo32.exe");
|
||||||
|
@ -224,8 +224,8 @@ static BOOL test_EnumProcessModulesEx_snapshot(HANDLE proc, struct moduleex_snap
|
||||||
{
|
{
|
||||||
void* cookie;
|
void* cookie;
|
||||||
DWORD needed;
|
DWORD needed;
|
||||||
char buffer[80];
|
char buffer[MAX_PATH];
|
||||||
char buffer2[80];
|
char buffer2[MAX_PATH];
|
||||||
MODULEINFO info;
|
MODULEINFO info;
|
||||||
int i, j;
|
int i, j;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
@ -334,7 +334,7 @@ static BOOL snapshot_are_disjoint(const struct moduleex_snapshot* seta, const st
|
||||||
static void snapshot_check_first_main_module(const struct moduleex_snapshot* snap, HANDLE proc,
|
static void snapshot_check_first_main_module(const struct moduleex_snapshot* snap, HANDLE proc,
|
||||||
const char* filename)
|
const char* filename)
|
||||||
{
|
{
|
||||||
char buffer[80];
|
char buffer[MAX_PATH];
|
||||||
MODULEINFO info;
|
MODULEINFO info;
|
||||||
const char* modname;
|
const char* modname;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
@ -359,7 +359,7 @@ static void snapshot_check_first_main_module(const struct moduleex_snapshot* sna
|
||||||
static unsigned int snapshot_count_in_dir(const struct moduleex_snapshot* snap, HANDLE proc, const char* dirname)
|
static unsigned int snapshot_count_in_dir(const struct moduleex_snapshot* snap, HANDLE proc, const char* dirname)
|
||||||
{
|
{
|
||||||
unsigned int count = 0;
|
unsigned int count = 0;
|
||||||
char buffer[128];
|
char buffer[MAX_PATH];
|
||||||
size_t dirname_len = strlen(dirname);
|
size_t dirname_len = strlen(dirname);
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
int i;
|
int i;
|
||||||
|
@ -375,7 +375,7 @@ static unsigned int snapshot_count_in_dir(const struct moduleex_snapshot* snap,
|
||||||
|
|
||||||
static void test_EnumProcessModulesEx(void)
|
static void test_EnumProcessModulesEx(void)
|
||||||
{
|
{
|
||||||
char buffer[200] = "C:\\windows\\system32\\msinfo32.exe";
|
char buffer[MAX_PATH] = "C:\\windows\\system32\\msinfo32.exe";
|
||||||
PROCESS_INFORMATION pi = {0};
|
PROCESS_INFORMATION pi = {0};
|
||||||
STARTUPINFOA si = {0};
|
STARTUPINFOA si = {0};
|
||||||
void *cookie;
|
void *cookie;
|
||||||
|
|
Loading…
Reference in a new issue