andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
dc8c34
From b1f6eac2792f5d774b0a4b30cea0da28d11bf08b Mon Sep 17 00:00:00 2001
dc8c34
From: Mark Reynolds <mreynolds@redhat.com>
dc8c34
Date: Mon, 24 Sep 2012 11:26:49 -0400
dc8c34
Subject: [PATCH 38/42] Coverity issue 13091
dc8c34
dc8c34
Bug Description:  Local var array "mychange" can go out of scope
dc8c34
dc8c34
Fix Description:  Declare "mychange" at the top of the function so it does not go out of scope.
dc8c34
dc8c34
Reviewed by: nkinder(Thanks!)
dc8c34
(cherry picked from commit d58ae20b75ccae99b2122a4a0d4fcf773a51115a)
dc8c34
---
dc8c34
 ldap/servers/slapd/plugin_acl.c | 2 +-
dc8c34
 1 file changed, 1 insertion(+), 1 deletion(-)
dc8c34
dc8c34
diff --git a/ldap/servers/slapd/plugin_acl.c b/ldap/servers/slapd/plugin_acl.c
dc8c34
index 3bc3f21..eebc292 100644
dc8c34
--- a/ldap/servers/slapd/plugin_acl.c
dc8c34
+++ b/ldap/servers/slapd/plugin_acl.c
dc8c34
@@ -136,6 +136,7 @@ plugin_call_acl_mods_update ( Slapi_PBlock *pb, int optype )
dc8c34
 	struct slapdplugin	*p;
dc8c34
 	int					rc = 0;
dc8c34
 	void				*change = NULL;
dc8c34
+	void				*mychange[2];
dc8c34
 	Slapi_Entry			*te = NULL;
dc8c34
 	Slapi_DN			*sdn = NULL;
dc8c34
 	Operation			*operation;
dc8c34
@@ -158,7 +159,6 @@ plugin_call_acl_mods_update ( Slapi_PBlock *pb, int optype )
dc8c34
 		break;
dc8c34
 	  case SLAPI_OPERATION_MODRDN:
dc8c34
 	  {
dc8c34
-		void *mychange[2];
dc8c34
 		char *newrdn = NULL;
dc8c34
 		Slapi_DN *psdn = NULL;
dc8c34
 		char *pdn = NULL;
dc8c34
-- 
dc8c34
1.8.1.4
dc8c34