[network-manager-applet] applet: fix possible crash when gtk_entry_get_text() returns NULL
- From: JiÅÃ KlimeÅ <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] applet: fix possible crash when gtk_entry_get_text() returns NULL
- Date: Wed, 15 Jun 2011 10:42:15 +0000 (UTC)
commit ed9a8b34dabd7a7712fa39996adb4a5734afa6f4
Author: JiÅÃ KlimeÅ <jklimes redhat com>
Date: Wed Jun 15 12:39:29 2011 +0200
applet: fix possible crash when gtk_entry_get_text() returns NULL
src/wireless-dialog.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/wireless-dialog.c b/src/wireless-dialog.c
index 5788b44..2e3c967 100644
--- a/src/wireless-dialog.c
+++ b/src/wireless-dialog.c
@@ -252,9 +252,8 @@ validate_dialog_ssid (NMAWirelessDialog *self)
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "network_name_entry"));
ssid = gtk_entry_get_text (GTK_ENTRY (widget));
- ssid_len = strlen (ssid);
- if (!ssid || !ssid_len || (ssid_len > 32))
+ if (!ssid || strlen (ssid) == 0 || strlen (ssid) > 32)
return NULL;
ssid_len = strlen (ssid);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]