[openchange/f17] Add patch for OpenChange bug #397 (crash under MAPIUninitialize)

Milan Crha mcrha at fedoraproject.org
Tue Jul 10 10:06:47 UTC 2012


commit 6c87f9a2be676ac732a3f4e2fd266ee688d23a14
Author: Milan Crha <mcrha at redhat.com>
Date:   Tue Jul 10 12:06:36 2012 +0200

    Add patch for OpenChange bug #397 (crash under MAPIUninitialize)

 openchange-1.0-uninit-crash.patch |   23 +++++++++++++++++++++++
 openchange.spec                   |    9 ++++++++-
 2 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/openchange-1.0-uninit-crash.patch b/openchange-1.0-uninit-crash.patch
new file mode 100644
index 0000000..7d6c665
--- /dev/null
+++ b/openchange-1.0-uninit-crash.patch
@@ -0,0 +1,23 @@
+diff -up openchange-1.0-BORG/libmapi/emsmdb.c.uninit-crash openchange-1.0-BORG/libmapi/emsmdb.c
+--- openchange-1.0-BORG/libmapi/emsmdb.c.uninit-crash	2012-03-13 17:58:28.000000000 +0100
++++ openchange-1.0-BORG/libmapi/emsmdb.c	2012-07-10 12:05:26.453775843 +0200
+@@ -271,6 +271,10 @@ int emsmdb_disconnect_dtor(void *data)
+ 	struct emsmdb_context	*emsmdb_ctx;
+ 
+ 	emsmdb_ctx = (struct emsmdb_context *)provider->ctx;
++
++	if (!emsmdb_ctx)
++		return MAPI_E_SUCCESS;
++
+ 	emsmdb_disconnect(emsmdb_ctx);	
+ 
+ 	talloc_free(emsmdb_ctx->cache_requests);
+@@ -283,7 +287,7 @@ int emsmdb_disconnect_dtor(void *data)
+ 		talloc_free(emsmdb_ctx->info.szDNPrefix);
+ 	}
+ 
+-	return 0;
++	return MAPI_E_SUCCESS;
+ }
+ 
+ 
diff --git a/openchange.spec b/openchange.spec
index 7c90a77..0dbc0f6 100644
--- a/openchange.spec
+++ b/openchange.spec
@@ -18,7 +18,7 @@
 
 Name: openchange
 Version: 1.0
-Release: 7%{?dist}
+Release: 8%{?dist}
 Group: Applications/System
 Summary: Provides access to Microsoft Exchange servers using native protocols
 License: GPLv3+ and Public Domain
@@ -60,6 +60,9 @@ Patch0: libmapi-0.8.2-libmapi-conflict.patch
 # RH bug #552984
 Patch1: openchange-0.9-generate-xml-doc.patch
 
+# http://tracker.openchange.org/issues/397
+Patch2: openchange-1.0-uninit-crash.patch
+
 %description
 OpenChange provides libraries to access Microsoft Exchange servers
 using native protocols.
@@ -120,6 +123,7 @@ This package provides the server elements for OpenChange.
 %setup -q -n %{name}-%{version}-%{nickname}
 %patch0 -p1 -b .libmapi-conflict
 %patch1 -p1 -b .generate-xml-doc
+%patch2 -p1 -b .uninit-crash
 
 %build
 %configure \
@@ -259,6 +263,9 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %changelog
+* Tue Jul 10 2012 Milan Crha <mcrha at redhat.com> - 1.0-8
+- Add patch for OpenChange bug #397 (crash under MAPIUninitialize)
+
 * Thu May 17 2012 Matthew Barnes <mbarnes at redhat.com> - 1.0-7
 - Do not build openchange-server in RHEL.
   (And make disabling the subpackage actually work.)


More information about the scm-commits mailing list