From 9443ec935c24dcf5fb6e0b9bca8b12b1f030cf39 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Tue, 26 Aug 2008 00:48:53 +0200 Subject: [PATCH] ntdll/file.c: 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 8cbd625..ec459aa 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -145,14 +145,16 @@ 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) 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" ); if (attr->RootDirectory) -- 1.5.6.3