Commit 72f40442 authored by Ove Kaaven's avatar Ove Kaaven Committed by Alexandre Julliard

Make MoveFileEx fail with ERROR_INVALID_PARAMETER (better than

crashing) when the source file operand is NULL.
parent c766ea7b
...@@ -2006,6 +2006,11 @@ BOOL WINAPI MoveFileExA( LPCSTR fn1, LPCSTR fn2, DWORD flag ) ...@@ -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 */
......
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