Commit d288d8d3 authored by Pierre Schweitzer's avatar Pierre Schweitzer Committed by Alexandre Julliard

comdlg32: Check for overflow before dereferencing.

parent 1c31ba25
......@@ -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++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment