wine-staging/patches/ntdll-NtOpenSection/0001-ntdll-Avoid-crash-in-om-tests-when-NULL-attr-is-pass.patch
2016-02-01 04:47:33 +01:00

27 lines
1020 B
Diff

From 6f76b7fd20b384f64ba58c61b9a3d51ea72fb846 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 29 Jan 2016 07:04:23 +0100
Subject: ntdll: Avoid crash in om tests when NULL attr is passed to
NtOpenSection.
---
dlls/ntdll/virtual.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 81a08cd..d8a13fc 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -2507,7 +2507,7 @@ NTSTATUS WINAPI NtOpenSection( HANDLE *handle, ACCESS_MASK access, const OBJECT_
req->access = access;
req->attributes = attr->Attributes;
req->rootdir = wine_server_obj_handle( attr->RootDirectory );
- wine_server_add_data( req, attr->ObjectName->Buffer, len );
+ if (attr && attr->ObjectName) wine_server_add_data( req, attr->ObjectName->Buffer, len );
if (!(ret = wine_server_call( req ))) *handle = wine_server_ptr_handle( reply->handle );
}
SERVER_END_REQ;
--
2.7.0