From f5455a2dbdaf614a151e68ca0c2c547bcf370ba9 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 10 Jan 2010 22:28:21 +0200 Subject: [PATCH] Verify that os_get_random() success for SA Query id --- hostapd/ctrl_iface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c index 430c4ba7e..4001bb539 100644 --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c @@ -165,10 +165,10 @@ static int hostapd_ctrl_iface_sa_query(struct hostapd_data *hapd, wpa_printf(MSG_DEBUG, "CTRL_IFACE SA_QUERY %s", txtaddr); - if (hwaddr_aton(txtaddr, addr)) + if (hwaddr_aton(txtaddr, addr) || + os_get_random(trans_id, WLAN_SA_QUERY_TR_ID_LEN) < 0) return -1; - os_get_random(trans_id, WLAN_SA_QUERY_TR_ID_LEN); ieee802_11_send_sa_query_req(hapd, addr, trans_id); return 0;