Test pointer before it is dereferenced in CreateEventW().

This commit is contained in:
Rein Klazes 2000-12-29 03:18:08 +00:00 committed by Alexandre Julliard
parent c4d1176754
commit 65dc8e47c6
1 changed files with 9 additions and 0 deletions

View File

@ -62,6 +62,15 @@ HANDLE WINAPI CreateEventW( SECURITY_ATTRIBUTES *sa, BOOL manual_reset,
SetLastError( ERROR_FILENAME_EXCED_RANGE );
return 0;
}
/* one buggy program needs this
* ("Van Dale Groot woordenboek der Nederlandse taal")
*/
if (sa && IsBadReadPtr(sa,sizeof(SECURITY_ATTRIBUTES)))
{
ERR("Bad security attributes pointer %p\n",sa);
SetLastError( ERROR_INVALID_PARAMETER);
return 0;
}
SERVER_START_REQ
{
struct create_event_request *req = server_alloc_req( sizeof(*req), len * sizeof(WCHAR) );