[balsa] abook-completion: Guard against null string
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] abook-completion: Guard against null string
- Date: Sat, 22 Jun 2019 01:10:45 +0000 (UTC)
commit 3c85a2a922346d12660b03ba880fdf0932ad1ccb
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Fri Jun 21 21:09:38 2019 -0400
abook-completion: Guard against null string
* libbalsa/abook-completion.c (completion_data_new):
ChangeLog | 6 ++++++
libbalsa/abook-completion.c | 6 ++++--
2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6e4964036..76f6780fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-06-21 Peter Bloomfield <pbloomfield bellsouth net>
+
+ Guard against null string.
+
+ * libbalsa/abook-completion.c (completion_data_new):
+
2019-06-21 Peter Bloomfield <pbloomfield bellsouth net>
Fix a thinko
diff --git a/libbalsa/abook-completion.c b/libbalsa/abook-completion.c
index 0efbd13ae..d70e1f13b 100644
--- a/libbalsa/abook-completion.c
+++ b/libbalsa/abook-completion.c
@@ -62,8 +62,10 @@ completion_data_new(InternetAddress * ia, const gchar * nick_name)
#ifdef CASE_INSENSITIVE_NAME
string_n = g_utf8_normalize(string->str, -1, G_NORMALIZE_ALL);
g_string_free(string, TRUE);
- ret->string = g_utf8_casefold(string_n, -1);
- g_free(string_n);
+ if (string_n != NULL) {
+ ret->string = g_utf8_casefold(string_n, -1);
+ g_free(string_n);
+ }
#else
ret->string = g_string_free(string, FALSE);
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]