[openldap/f15] fix: segmentation fault caused by double-free in ldapexop

jvcelak jvcelak at fedoraproject.org
Tue Jun 28 09:27:27 UTC 2011


commit 000edf8669b9f2afe08f3390786682400147ac13
Author: Jan Vcelak <jvcelak at redhat.com>
Date:   Mon Jun 27 15:13:54 2011 +0200

    fix: segmentation fault caused by double-free in ldapexop
    
    Resolves: #699683

 openldap-ldapexop-double-free.patch |   28 ++++++++++++++++++++++++++++
 openldap.spec                       |    2 ++
 2 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/openldap-ldapexop-double-free.patch b/openldap-ldapexop-double-free.patch
new file mode 100644
index 0000000..5d4b2dd
--- /dev/null
+++ b/openldap-ldapexop-double-free.patch
@@ -0,0 +1,28 @@
+Segmentation fault fix caused by double free in ldapexop.
+
+Resolves: #699683
+Author: Jan Vcelak <jvcelak at redhat.com>
+Upstream: ITS #6946, git 3fcf2b1
+
+diff --git a/clients/tools/ldapexop.c b/clients/tools/ldapexop.c
+index f17e085..316eca1 100644
+--- a/clients/tools/ldapexop.c
++++ b/clients/tools/ldapexop.c
+@@ -247,7 +247,7 @@ main( int argc, char *argv[] )
+ 		char		*retoid = NULL;
+ 		struct berval	*retdata = NULL;
+ 
+-		rc = ldap_parse_extended_result( ld, res, &retoid, &retdata, 1 );
++		rc = ldap_parse_extended_result( ld, res, &retoid, &retdata, 0 );
+ 
+ 		if ( rc != LDAP_SUCCESS ) {
+ 			tool_perror( "ldap_parse_extended_result", rc, NULL, NULL, NULL, NULL );
+@@ -294,7 +294,7 @@ main( int argc, char *argv[] )
+ 			printf(_("# extended operation response\n"));
+ 		}
+ 
+-		rc = ldap_parse_extended_result( ld, res, &retoid, &retdata, 1 );
++		rc = ldap_parse_extended_result( ld, res, &retoid, &retdata, 0 );
+ 		if ( rc != LDAP_SUCCESS ) {
+ 			tool_perror( "ldap_parse_extended_result", rc, NULL, NULL, NULL, NULL );
+ 			rc = EXIT_FAILURE;
diff --git a/openldap.spec b/openldap.spec
index 6d45cf8..0fb460b 100644
--- a/openldap.spec
+++ b/openldap.spec
@@ -32,6 +32,7 @@ Patch9: openldap-nss-nofork.patch
 Patch10: openldap-nss-null-pointer.patch
 Patch11: openldap-slapadd-hang.patch
 Patch12: openldap-nss-cacertdir-soft-error.patch
+Patch13: openldap-ldapexop-double-free.patch
 
 # patches for the evolution library (see README.evolution)
 Patch200: openldap-evolution-ntlm.patch
@@ -136,6 +137,7 @@ pushd openldap-%{version}
 %patch10 -p1 -b .nss-null-pointer
 %patch11 -p1 -b .slapadd-hang
 %patch12 -p1 -b .nss-cacertdir-soft-error
+%patch13 -p1 -b .ldapexop-double-free
 
 cp %{_datadir}/libtool/config/config.{sub,guess} build/
 


More information about the scm-commits mailing list