comdlg32: Check for overflow before dereferencing.
Signed-off-by: Pierre Schweitzer <pierre@reactos.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1c31ba252c
commit
d288d8d333
|
@ -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++;
|
||||
|
|
Loading…
Reference in New Issue