Marcus Meissner : shell32/tests: Fixed potential overflow.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Feb 19 07:02:08 CST 2007
Module: wine
Branch: master
Commit: 3b5b23311c7b77f97c919b58dc058456c4fab4cd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3b5b23311c7b77f97c919b58dc058456c4fab4cd
Author: Marcus Meissner <marcus at jet.franken.de>
Date: Sun Feb 18 15:59:59 2007 +0100
shell32/tests: Fixed potential overflow.
---
dlls/shell32/tests/shlfileop.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c
index c952bae..801dbf4 100644
--- a/dlls/shell32/tests/shlfileop.c
+++ b/dlls/shell32/tests/shlfileop.c
@@ -32,7 +32,7 @@
#define FOF_NORECURSION 0x1000
#endif
-CHAR CURR_DIR[MAX_PATH];
+static CHAR CURR_DIR[MAX_PATH];
static HMODULE hshell32;
static int (WINAPI *pSHCreateDirectoryExA)(HWND, LPCSTR, LPSECURITY_ATTRIBUTES);
@@ -235,7 +235,7 @@ static void test_delete(void)
{
SHFILEOPSTRUCTA shfo;
DWORD ret;
- CHAR buf[MAX_PATH];
+ CHAR buf[sizeof(CURR_DIR)+sizeof("/test?.txt")+1];
sprintf(buf, "%s\\%s", CURR_DIR, "test?.txt");
buf[strlen(buf) + 1] = '\0';
More information about the wine-cvs
mailing list