ntdll: Fix possible TRACE crash.

This commit is contained in:
Paul Vriens 2006-07-03 14:20:40 +02:00 committed by Alexandre Julliard
parent 65639ab722
commit 2e3e74ebd0

View file

@ -55,13 +55,13 @@ NTSTATUS WINAPI NtCreateKey( PHANDLE retkey, ACCESS_MASK access, const OBJECT_AT
{
NTSTATUS ret;
TRACE( "(%p,%s,%s,%lx,%lx,%p)\n", attr->RootDirectory, debugstr_us(attr->ObjectName),
debugstr_us(class), options, access, retkey );
if (!retkey || !attr) return STATUS_ACCESS_VIOLATION;
if (attr->Length > sizeof(OBJECT_ATTRIBUTES)) return STATUS_INVALID_PARAMETER;
if (attr->ObjectName->Length > MAX_NAME_LENGTH) return STATUS_BUFFER_OVERFLOW;
TRACE( "(%p,%s,%s,%lx,%lx,%p)\n", attr->RootDirectory, debugstr_us(attr->ObjectName),
debugstr_us(class), options, access, retkey );
SERVER_START_REQ( create_key )
{
req->parent = attr->RootDirectory;