[evolution-patches][Contacts] Fix for bug#32574
- From: ShiPu <Shi Pu Sun COM>
- To: Evolution patches List <evolution-patches gnome org>
- Subject: [evolution-patches][Contacts] Fix for bug#32574
- Date: Wed, 04 Jan 2006 19:47:54 +0800
hi,
sorry for adding a wrong attach, pls ignore the last mail.
If evolution running on solaris10, and based on SUN LDAP libraries.
when new an addressbook on LDAP servers, it would cause a crash.
It cause by eabc_details_search() in
addressbook/gui/component/addressbook-config.c. In Linux, because we use
Openldap libraries, ldap_url_parse("ldap://:389/??one", &lud) would
return LDAP_SUCCESS when url's host==NULL. But in Sun LDAP libraries(or
mozilla ldap libs) ldap_url_parse() would not return LDAP_SUCCESS if
url's host==NULL, so lud would be NULL and lud should be checked before
using it. But when using lud->lud_scope, it don't do this way.
this patch adds a check before using lud->scope. Is there
anybody could review it for me?
thanks,
jerry
Index: addressbook/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.2026
diff -u -p -r1.2026 ChangeLog
--- addressbook/ChangeLog 22 Dec 2005 07:55:15 -0000 1.2026
+++ addressbook/ChangeLog 4 Jan 2006 11:06:01 -0000
@@ -1,3 +1,8 @@
+2006-01-04 Shi Pu <shi pu sun com>
+
+ * gui/component/addressbook-config.c (eabc_details_search): add a not
+ NULL-pointer check before using lud->scope.
+
2005-12-22 Srinivasa Ragavan <sragavan novell com>
* gui/search/addresstypes.xml: Modified the categories to option menu
Index: addressbook/gui/component/addressbook-config.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/addressbook-config.c,v
retrieving revision 1.105
diff -u -p -r1.105 addressbook-config.c
--- addressbook/gui/component/addressbook-config.c 25 Nov 2005 20:32:35 -0000 1.105
+++ addressbook/gui/component/addressbook-config.c 4 Jan 2006 11:06:02 -0000
@@ -890,17 +892,19 @@ eabc_details_search(EConfig *ec, EConfig
g_signal_connect (sdialog->rootdn, "changed", G_CALLBACK (rootdn_changed_cb), sdialog);
sdialog->scope_optionmenu = glade_xml_get_widget (gui, "scope-optionmenu");
- switch (lud->lud_scope) {
- case LDAP_SCOPE_BASE:
- sdialog->scope = ADDRESSBOOK_LDAP_SCOPE_BASE;
- break;
- default:
- case LDAP_SCOPE_ONELEVEL:
- sdialog->scope = ADDRESSBOOK_LDAP_SCOPE_ONELEVEL;
- break;
- case LDAP_SCOPE_SUBTREE:
- sdialog->scope = ADDRESSBOOK_LDAP_SCOPE_SUBTREE;
- break;
+ if(lud){
+ switch (lud->lud_scope) {
+ case LDAP_SCOPE_BASE:
+ sdialog->scope = ADDRESSBOOK_LDAP_SCOPE_BASE;
+ break;
+ default:
+ case LDAP_SCOPE_ONELEVEL:
+ sdialog->scope = ADDRESSBOOK_LDAP_SCOPE_ONELEVEL;
+ break;
+ case LDAP_SCOPE_SUBTREE:
+ sdialog->scope = ADDRESSBOOK_LDAP_SCOPE_SUBTREE;
+ break;
+ }
}
gtk_option_menu_set_history (GTK_OPTION_MENU(sdialog->scope_optionmenu), sdialog->scope);
g_signal_connect(sdialog->scope_optionmenu, "changed", G_CALLBACK(scope_optionmenu_changed_cb), sdialog);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]