Make MoveFileEx fail with ERROR_INVALID_PARAMETER (better than
crashing) when the source file operand is NULL.
This commit is contained in:
parent
c766ea7b5c
commit
72f404421c
@ -2006,6 +2006,11 @@ BOOL WINAPI MoveFileExA( LPCSTR fn1, LPCSTR fn2, DWORD flag )
|
|||||||
|
|
||||||
TRACE("(%s,%s,%04lx)\n", fn1, fn2, flag);
|
TRACE("(%s,%s,%04lx)\n", fn1, fn2, flag);
|
||||||
|
|
||||||
|
if (!fn1) {
|
||||||
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!DOSFS_GetFullName( fn1, TRUE, &full_name1 )) return FALSE;
|
if (!DOSFS_GetFullName( fn1, TRUE, &full_name1 )) return FALSE;
|
||||||
|
|
||||||
if (fn2) /* !fn2 means delete fn1 */
|
if (fn2) /* !fn2 means delete fn1 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user