summaryrefslogtreecommitdiff
path: root/src/supplicant-manager/nm-supplicant-interface.c
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2015-05-07 11:27:26 +0200
committerJiří Klimeš <jklimes@redhat.com>2015-05-07 13:08:16 +0200
commit33527341b1e35034a4f1736df4bc98f8ac8418ab (patch)
tree6e7fe06246fef7712f983fbf7557c5bce4dcab0b /src/supplicant-manager/nm-supplicant-interface.c
parentf55a272aded1fa620c9b41dc05eff7c808d740ab (diff)
downloadNetworkManager-33527341b1e35034a4f1736df4bc98f8ac8418ab.tar.gz
wifi: fix a crash in on_bss_proxy_acquired()
g_dbus_proxy_get_cached_property_names() function can return NULL. Program received signal SIGSEGV, Segmentation fault. on_bss_proxy_acquired (proxy=0x7fffe4003880 [GDBusProxy], result=0x895490, user_data=<optimized out>) at supplicant-manager/nm-supplicant-interface.c:159 159 while (*iter) { (gdb) bt #0 0x000000000048fac7 in on_bss_proxy_acquired (proxy=0x7fffe4003880 [GDBusProxy], result=0x895490, user_data=<optimized out>) at supplicant-manager/nm-supplicant-interface.c:159 #1 0x0000003bf84728b7 in g_simple_async_result_complete (simple=0x895490 [GSimpleAsyncResult]) at gsimpleasyncresult.c:763 #2 0x0000003bf8472919 in complete_in_idle_cb (data=<optimized out>) at gsimpleasyncresult.c:775 #3 0x0000003bf5c497fb in g_main_context_dispatch (context=0x7d6420) at gmain.c:3111 #4 0x0000003bf5c497fb in g_main_context_dispatch (context=context@entry=0x7d6420) at gmain.c:3710 #5 0x0000003bf5c49b98 in g_main_context_iterate (context=0x7d6420, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3781 #6 0x0000003bf5c49ec2 in g_main_loop_run (loop=0x7d64e0) at gmain.c:3975 #7 0x00000000004349d6 in main (argc=1, argv=0x7fffffffe598) at main.c:486
Diffstat (limited to 'src/supplicant-manager/nm-supplicant-interface.c')
-rw-r--r--src/supplicant-manager/nm-supplicant-interface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/supplicant-manager/nm-supplicant-interface.c b/src/supplicant-manager/nm-supplicant-interface.c
index 4731ad7d76..19795bf3b9 100644
--- a/src/supplicant-manager/nm-supplicant-interface.c
+++ b/src/supplicant-manager/nm-supplicant-interface.c
@@ -156,7 +156,7 @@ on_bss_proxy_acquired (GDBusProxy *proxy, GAsyncResult *result, gpointer user_da
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
iter = properties = g_dbus_proxy_get_cached_property_names (proxy);
- while (*iter) {
+ while (iter && *iter) {
GVariant *copy = g_dbus_proxy_get_cached_property (proxy, *iter);
g_variant_builder_add (&builder, "{sv}", *iter++, copy);