[ekiga] LDAP: Fixed possible crash on invalid fields during edit.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] LDAP: Fixed possible crash on invalid fields during edit.
- Date: Sat, 27 Oct 2012 11:42:09 +0000 (UTC)
commit c499c23309c5d852a62407638ef5353356ee9c99
Author: Damien Sandras <dsandras beip be>
Date: Sat Oct 27 13:41:51 2012 +0200
LDAP: Fixed possible crash on invalid fields during edit.
plugins/ldap/ldap-book.cpp | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/plugins/ldap/ldap-book.cpp b/plugins/ldap/ldap-book.cpp
index 6ecd07b..1ece8d5 100644
--- a/plugins/ldap/ldap-book.cpp
+++ b/plugins/ldap/ldap-book.cpp
@@ -1078,7 +1078,13 @@ OPENLDAP::BookFormInfo (Ekiga::Form &result,
}
}
- ldap_url_parse (new_bits.c_str(), &url_base);
+ if (ldap_url_parse (new_bits.c_str(), &url_base))
+ errmsg += _("Invalid Server URI\n");
+
+ if (!errmsg.empty()) {
+ return -1;
+ }
+
url_host->lud_dn = ldap_strdup (base.c_str());
url_host->lud_attrs = url_base->lud_attrs;
url_host->lud_scope = url_base->lud_scope;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]