aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-09-22 07:57:40 +0000
committerChristian Grothoff <christian@grothoff.org>2016-09-22 07:57:40 +0000
commit85a9cb3418c9444e24381a4c117d598eaee2c48b (patch)
tree0152319fc57d6d4d3280e21c5b00a01d1fca846b
parent72d74586ed38d908df953517e069e57ebbac1a1c (diff)
downloadgnunet-gtk-85a9cb3418c9444e24381a4c117d598eaee2c48b.tar.gz
gnunet-gtk-85a9cb3418c9444e24381a4c117d598eaee2c48b.zip
-fix crash on empty label
-rw-r--r--src/conversation/gnunet-conversation-gtk_import.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conversation/gnunet-conversation-gtk_import.c b/src/conversation/gnunet-conversation-gtk_import.c
index 199ed9e2..0123d57d 100644
--- a/src/conversation/gnunet-conversation-gtk_import.c
+++ b/src/conversation/gnunet-conversation-gtk_import.c
@@ -284,6 +284,8 @@ add_phone ()
284 add_waiting = GNUNET_NO; 284 add_waiting = GNUNET_NO;
285 ego = GCG_EGOS_get_selected_ego (); 285 ego = GCG_EGOS_get_selected_ego ();
286 zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego); 286 zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego);
287 if (0 == strlen (phone_label))
288 return;
287 add_phone_qe = GNUNET_NAMESTORE_records_lookup (ns, 289 add_phone_qe = GNUNET_NAMESTORE_records_lookup (ns,
288 &zone_pkey, 290 &zone_pkey,
289 phone_label, 291 phone_label,
@@ -446,6 +448,8 @@ GSC_remove_phone ()
446 if (NULL == phone_label) 448 if (NULL == phone_label)
447 return; 449 return;
448 GNUNET_assert (NULL == remove_phone_qe); 450 GNUNET_assert (NULL == remove_phone_qe);
451 if (0 == strlen (phone_label))
452 return;
449 remove_phone_qe = GNUNET_NAMESTORE_records_lookup (ns, 453 remove_phone_qe = GNUNET_NAMESTORE_records_lookup (ns,
450 &zone_pkey, 454 &zone_pkey,
451 phone_label, 455 phone_label,