You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Added patches for two error handling issues in wineserver detected by Coverity.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
From b2fec3a86116deb45df5c8f3f6ac07434d3d34a7 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 23 Jan 2016 20:23:04 +0100
|
||||
Subject: server: Add missing check for objattr variable in load_registry
|
||||
wineserver call (Coverity).
|
||||
|
||||
---
|
||||
server/registry.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/server/registry.c b/server/registry.c
|
||||
index 5723824..a35765c 100644
|
||||
--- a/server/registry.c
|
||||
+++ b/server/registry.c
|
||||
@@ -2187,6 +2187,8 @@ DECL_HANDLER(load_registry)
|
||||
const struct security_descriptor *sd;
|
||||
const struct object_attributes *objattr = get_req_object_attributes( &sd, &name );
|
||||
|
||||
+ if (!objattr) return;
|
||||
+
|
||||
if (!thread_single_check_privilege( current, &SeRestorePrivilege ))
|
||||
{
|
||||
set_error( STATUS_PRIVILEGE_NOT_HELD );
|
||||
--
|
||||
2.6.4
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 4e690407c338be1553e6c2c18977364152477339 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 23 Jan 2016 20:23:48 +0100
|
||||
Subject: server: Avoid invalid memory access if creation of namespace fails in
|
||||
create_directory (Coverity).
|
||||
|
||||
---
|
||||
server/directory.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/directory.c b/server/directory.c
|
||||
index de049ef..937ab89 100644
|
||||
--- a/server/directory.c
|
||||
+++ b/server/directory.c
|
||||
@@ -192,7 +192,7 @@ static struct directory *create_directory( struct directory *root, const struct
|
||||
if (!(dir->entries = create_namespace( hash_size )))
|
||||
{
|
||||
release_object( dir );
|
||||
- dir = NULL;
|
||||
+ return NULL;
|
||||
}
|
||||
if (sd) default_set_sd( &dir->obj, sd, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
|
||||
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION );
|
||||
--
|
||||
2.6.4
|
||||
|
||||
Reference in New Issue
Block a user