Pierre Schweitzer : comdlg32: Check for overflow before dereferencing.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon May 2 09:52:30 CDT 2016
Module: wine
Branch: master
Commit: d288d8d333f6faea9d64a0af944f125663a449d8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d288d8d333f6faea9d64a0af944f125663a449d8
Author: Pierre Schweitzer <pierre at reactos.org>
Date: Sun May 1 17:22:44 2016 +0200
comdlg32: Check for overflow before dereferencing.
Signed-off-by: Pierre Schweitzer <pierre at reactos.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comdlg32/filedlg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c
index 1453396..282582b 100644
--- a/dlls/comdlg32/filedlg.c
+++ b/dlls/comdlg32/filedlg.c
@@ -650,7 +650,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++;
More information about the wine-cvs
mailing list