Commit 4ff3d995 authored by Kai Blin's avatar Kai Blin Committed by Alexandre Julliard

comdlg32: Avoid possible NULL pointer dereference (Coverity).

parent 4dceb1f8
......@@ -312,8 +312,10 @@ static void FD31_UpdateResult(const FD31_DATA *lfs, const WCHAR *tmpstr)
if (lenstr2 > 3)
tmpstr2[lenstr2++]='\\';
lstrcpynW(tmpstr2+lenstr2, tmpstr, BUFFILE-lenstr2);
if (ofnW->lpstrFile)
lstrcpynW(ofnW->lpstrFile, tmpstr2, ofnW->nMaxFile);
if (!ofnW->lpstrFile)
return;
lstrcpynW(ofnW->lpstrFile, tmpstr2, ofnW->nMaxFile);
/* set filename offset */
p = PathFindFileNameW(ofnW->lpstrFile);
......
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