shell32/tests: Fixed potential overflow.
This commit is contained in:
parent
e37ff84eff
commit
3b5b23311c
|
@ -32,7 +32,7 @@
|
||||||
#define FOF_NORECURSION 0x1000
|
#define FOF_NORECURSION 0x1000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CHAR CURR_DIR[MAX_PATH];
|
static CHAR CURR_DIR[MAX_PATH];
|
||||||
|
|
||||||
static HMODULE hshell32;
|
static HMODULE hshell32;
|
||||||
static int (WINAPI *pSHCreateDirectoryExA)(HWND, LPCSTR, LPSECURITY_ATTRIBUTES);
|
static int (WINAPI *pSHCreateDirectoryExA)(HWND, LPCSTR, LPSECURITY_ATTRIBUTES);
|
||||||
|
@ -235,7 +235,7 @@ static void test_delete(void)
|
||||||
{
|
{
|
||||||
SHFILEOPSTRUCTA shfo;
|
SHFILEOPSTRUCTA shfo;
|
||||||
DWORD ret;
|
DWORD ret;
|
||||||
CHAR buf[MAX_PATH];
|
CHAR buf[sizeof(CURR_DIR)+sizeof("/test?.txt")+1];
|
||||||
|
|
||||||
sprintf(buf, "%s\\%s", CURR_DIR, "test?.txt");
|
sprintf(buf, "%s\\%s", CURR_DIR, "test?.txt");
|
||||||
buf[strlen(buf) + 1] = '\0';
|
buf[strlen(buf) + 1] = '\0';
|
||||||
|
|
Loading…
Reference in New Issue