=?UTF-8?Q?R=C3=A9mi=20Bernon=20?=: dbghelp: Prevent an invalid memory access when the search path element is empty.
Alexandre Julliard
julliard at winehq.org
Thu Aug 29 15:05:50 CDT 2019
Module: wine
Branch: master
Commit: d263ba97fb7c9ada7ae847909f35cbf5db671216
URL: https://source.winehq.org/git/wine.git/?a=commit;h=d263ba97fb7c9ada7ae847909f35cbf5db671216
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Thu Aug 29 12:36:58 2019 +0200
dbghelp: Prevent an invalid memory access when the search path element is empty.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dbghelp/path.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/dbghelp/path.c b/dlls/dbghelp/path.c
index a0fc0cf..f8a7f3d 100644
--- a/dlls/dbghelp/path.c
+++ b/dlls/dbghelp/path.c
@@ -229,6 +229,7 @@ static BOOL do_searchW(PCWSTR file, PWSTR buffer, BOOL recurse,
static const WCHAR S_DotDotW[] = {'.','.','\0'};
pos = strlenW(buffer);
+ if (pos == 0) return FALSE;
if (buffer[pos - 1] != '\\') buffer[pos++] = '\\';
strcpyW(buffer + pos, S_AllW);
if ((h = FindFirstFileW(buffer, &fd)) == INVALID_HANDLE_VALUE)
More information about the wine-cvs
mailing list