andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone

Blame SOURCES/0055-Ticket-48276-initialize-free_flags-in-reslimit_updat.patch

a2f18f
From 4040a7b0968db2aa5b905c7268abf57eca2ec8c2 Mon Sep 17 00:00:00 2001
a2f18f
From: Mark Reynolds <mreynolds@redhat.com>
a2f18f
Date: Mon, 14 Sep 2015 12:01:08 -0400
a2f18f
Subject: [PATCH 55/61] Ticket 48276 - initialize free_flags in
a2f18f
 reslimit_update_from_entry()
a2f18f
a2f18f
Description:  In reslimit_update_from_entry() the free_flags was not initialized,
a2f18f
              which could lead to it being seen as set, and cause an entry's
a2f18f
              vattrs to be incorrectly/unexpectedly freed.
a2f18f
a2f18f
https://fedorahosted.org/389/ticket/48276
a2f18f
a2f18f
Reviewed by: nhosoi(Thanks!)
a2f18f
a2f18f
(cherry picked from commit 2311c71cec33c29863bdb1dabe1ed363679316d3)
a2f18f
(cherry picked from commit 5f32582d043a5498791dda5af7091bf1a4a320f0)
a2f18f
---
a2f18f
 ldap/servers/slapd/resourcelimit.c | 13 ++++++++-----
a2f18f
 1 file changed, 8 insertions(+), 5 deletions(-)
a2f18f
a2f18f
diff --git a/ldap/servers/slapd/resourcelimit.c b/ldap/servers/slapd/resourcelimit.c
a2f18f
index 8c0a09c..7630f88 100644
a2f18f
--- a/ldap/servers/slapd/resourcelimit.c
a2f18f
+++ b/ldap/servers/slapd/resourcelimit.c
a2f18f
@@ -342,11 +342,14 @@ reslimit_update_from_dn( Slapi_Connection *conn, Slapi_DN *dn )
a2f18f
 int
a2f18f
 reslimit_update_from_entry( Slapi_Connection *conn, Slapi_Entry *e )
a2f18f
 {
a2f18f
-	char					*fnname = "reslimit_update_from_entry()";
a2f18f
-	char					*actual_type_name, *get_ext_logname;
a2f18f
-	int						i, rc, type_name_disposition, free_flags;
a2f18f
-	SLAPIResLimitConnData	*rlcdp;
a2f18f
-	Slapi_ValueSet			*vs;
a2f18f
+	SLAPIResLimitConnData *rlcdp = NULL;
a2f18f
+	Slapi_ValueSet *vs = NULL;
a2f18f
+	char *fnname = "reslimit_update_from_entry()";
a2f18f
+	char *actual_type_name = NULL;
a2f18f
+	char *get_ext_logname = NULL;
a2f18f
+	int type_name_disposition = 0;
a2f18f
+	int free_flags = 0;
a2f18f
+	int rc, i;
a2f18f
 
a2f18f
 	LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, "=> %s conn=0x%x, entry=0x%x\n",
a2f18f
 			fnname, conn, e );
a2f18f
-- 
a2f18f
1.9.3
a2f18f