From be41ea660b58f9a0ed6194d1b1233c679d927405 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Mon, 2 May 2016 17:45:39 +0000 Subject: [PATCH] [COMDLG32] Import Wine commit: - d288d8d333f6faea9d64a0af944f125663a449d8, Check for overflow before dereferencing. svn path=/trunk/; revision=71234 --- reactos/dll/win32/comdlg32/filedlg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/comdlg32/filedlg.c b/reactos/dll/win32/comdlg32/filedlg.c index ecd89c77115..ea518b4f217 100644 --- a/reactos/dll/win32/comdlg32/filedlg.c +++ b/reactos/dll/win32/comdlg32/filedlg.c @@ -621,7 +621,7 @@ int COMDLG32_SplitFileNames(LPWSTR lpstrEdit, UINT nStrLen, LPWSTR *lpstrFileLis if ( lpstrEdit[nStrCharCount]=='"' ) { nStrCharCount++; - while ((lpstrEdit[nStrCharCount]!='"') && (nStrCharCount <= nStrLen)) + while ((nStrCharCount <= nStrLen) && (lpstrEdit[nStrCharCount]!='"')) { (*lpstrFileList)[nFileIndex++] = lpstrEdit[nStrCharCount]; nStrCharCount++; -- 2.17.1