diff --git a/reactos/dll/win32/kernel32/client/file/volume.c b/reactos/dll/win32/kernel32/client/file/volume.c index 72dc6f384fe..8315ec4c35d 100644 --- a/reactos/dll/win32/kernel32/client/file/volume.c +++ b/reactos/dll/win32/kernel32/client/file/volume.c @@ -552,6 +552,12 @@ GetVolumePathNameW(IN LPCWSTR lpszFileName, DWORD ErrorCode; BOOL Result = FALSE; + if (!lpszFileName || !lpszVolumePathName || !cchBufferLength) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if (!(PathLength = GetFullPathNameW(lpszFileName, 0, NULL, NULL))) { return Result;