Re: [PATCH] userenv: GetUserProfileDirectoryW should fail with ERROR_INVALID_HANDLE if handle is NULL.
4 Nov
2011
4 Nov
'11
10 a.m.
Christian Inci <chris.pcguy.inci(a)gmail.com> writes:
@@ -149,6 +149,12 @@ BOOL WINAPI GetUserProfileDirectoryW( HANDLE hToken, LPWSTR lpProfileDir,
TRACE( "%p %p %p\n", hToken, lpProfileDir, lpcchSize );
+ if (!hToken) + { + SetLastError( ERROR_INVALID_HANDLE ); + return FALSE; + }
There's no reason to treat a 0 handle differently. Please stop adding such special cases just to satisfy the tests. Parameter checking needs to fall out of the implementation. -- Alexandre Julliard julliard(a)winehq.org
5242
Age (days ago)
5242
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard