[PATCH] fixed potential overflow
Marcus Meissner
marcus at jet.franken.de
Sun Feb 18 08:59:59 CST 2007
Hi,
spotted by Coverity, CID 308.
Its a long shot, admittedly.
Ciao, Marcus
---
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..632b75e 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)+strlen("/test?.txt")+2];
sprintf(buf, "%s\\%s", CURR_DIR, "test?.txt");
buf[strlen(buf) + 1] = '\0';
--
1.4.3.4
More information about the wine-patches
mailing list