aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/sme.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-09-07 15:27:42 (GMT)
committerJouni Malinen <j@w1.fi>2014-09-07 15:27:42 (GMT)
commitcb5ef952c843de4429b11e180f9e88b568460153 (patch)
tree5a8e6eb0759e8cd63eab59d3717a84bd19d7be98 /wpa_supplicant/sme.c
parentc9cd78e5a14bd09d160dd66d6c1c9fe19b548857 (diff)
downloadhostap-cb5ef952c843de4429b11e180f9e88b568460153.zip
hostap-cb5ef952c843de4429b11e180f9e88b568460153.tar.gz
hostap-cb5ef952c843de4429b11e180f9e88b568460153.tar.bz2
SME: Verify that os_get_random() succeeds for SA Query
Be more consistent on checking os_get_random() return value (CID 72706). Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/sme.c')
-rw-r--r--wpa_supplicant/sme.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 5188b9f..e4f2d12 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -1318,7 +1318,10 @@ static void sme_sa_query_timer(void *eloop_ctx, void *timeout_ctx)
wpa_s->sme.sa_query_trans_id = nbuf;
wpa_s->sme.sa_query_count++;
- os_get_random(trans_id, WLAN_SA_QUERY_TR_ID_LEN);
+ if (os_get_random(trans_id, WLAN_SA_QUERY_TR_ID_LEN) < 0) {
+ wpa_printf(MSG_DEBUG, "Could not generate SA Query ID");
+ return;
+ }
timeout = sa_query_retry_timeout;
sec = ((timeout / 1000) * 1024) / 1000;