From e24b273d367aee0f200a0f57ddcceeac2396bf54 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Tue, 26 Aug 2008 00:48:53 +0200 Subject: [PATCH] Fix a possible NULL dereferencing. Spotted by James Hawkins, the variable at risk is "attr". --- dlls/ntdll/file.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 21f028a..d70bce2 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -145,17 +145,19 @@ NTSTATUS WINAPI NtCreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATTRIB ANSI_STRING unix_name; int created = FALSE; - TRACE("handle=%p access=%08x name=%s objattr=%08x root=%p sec=%p io=%p alloc_size=%p\n" - "attr=%08x sharing=%08x disp=%d options=%08x ea=%p.0x%08x\n", - handle, access, debugstr_us(attr->ObjectName), attr->Attributes, - attr->RootDirectory, attr->SecurityDescriptor, io, alloc_size, - attributes, sharing, disposition, options, ea_buffer, ea_length ); + TRACE( "handle=%p access=%08x io=%p alloc_size=%p attr=%08x\n" + "sharing=%08x disp=%d options=%08x ea=%p.0x%08x\n", + handle, access, io, alloc_size, attributes, sharing, disposition, + options, ea_buffer, ea_length ); if (!attr || !attr->ObjectName) { TRACE("returning STATUS_INVALID_PARAMETER\n"); return STATUS_INVALID_PARAMETER; } + + TRACE( "name=%s objattr=%08x root=%p sec=%p\n", debugstr_us(attr->ObjectName), + attr->Attributes, attr->RootDirectory, attr->SecurityDescriptor ); if (alloc_size) FIXME( "alloc_size not supported\n" ); -- 1.5.6.3