Browse Source

D-Bus: Fix BSS Mode getter for invalid DMG BSS

Previous version could have used uninitialized char* when a DMG with
invalid capabilities were added to BSS table from scan results.

Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen 8 years ago
parent
commit
29065686ac
1 changed files with 3 additions and 0 deletions
  1. 3 0
      wpa_supplicant/dbus/dbus_new_handlers.c

+ 3 - 0
wpa_supplicant/dbus/dbus_new_handlers.c

@@ -3699,6 +3699,9 @@ dbus_bool_t wpas_dbus_getter_bss_mode(
 		case IEEE80211_CAP_DMG_AP:
 			mode = "infrastructure";
 			break;
+		default:
+			mode = "";
+			break;
 		}
 	} else {
 		if (res->caps & IEEE80211_CAP_IBSS)