Browse Source

Fix ESS_DISASSOC ctrl_iface command parser

strchr can return NULL and that needs to be checked instead of what the
pointer could be pointing to.

Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen 12 years ago
parent
commit
eb4737f6df
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hostapd/ctrl_iface.c

+ 1 - 1
hostapd/ctrl_iface.c

@@ -556,7 +556,7 @@ static int hostapd_ctrl_iface_ess_disassoc(struct hostapd_data *hapd,
 		return -1;
 
 	url = os_strchr(timerstr, ' ');
-	if (*url != ' ')
+	if (url == NULL)
 		return -1;
 	url++;
 	url_len = os_strlen(url);