projects
/
mech_eap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6473e80
)
P2P: Verify that os_get_random() succeeds
author
Jouni Malinen
<j@w1.fi>
Sun, 7 Sep 2014 15:05:53 +0000
(18:05 +0300)
committer
Jouni Malinen
<j@w1.fi>
Sun, 7 Sep 2014 15:05:53 +0000
(18:05 +0300)
Be more consistent with os_get_random() use (CID 72710).
Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/p2p_supplicant.c
patch
|
blob
|
history
diff --git
a/wpa_supplicant/p2p_supplicant.c
b/wpa_supplicant/p2p_supplicant.c
index
9fc3e6c
..
c77ae6a
100644
(file)
--- a/
wpa_supplicant/p2p_supplicant.c
+++ b/
wpa_supplicant/p2p_supplicant.c
@@
-5075,7
+5075,8
@@
static int wpas_p2p_select_freq_no_pref(struct wpa_supplicant *wpa_s,
unsigned int i, r;
/* first try some random selection of the social channels */
- os_get_random((u8 *) &r, sizeof(r));
+ if (os_get_random((u8 *) &r, sizeof(r)) < 0)
+ return -1;
for (i = 0; i < 3; i++) {
params->freq = 2412 + ((r + i) % 3) * 25;