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:
8e8f849
)
Check select() return value in wpa_ctrl_request()
author
Dmitry Shmidt
<dimitrysh@google.com>
Tue, 15 Mar 2011 13:54:21 +0000
(15:54 +0200)
committer
Jouni Malinen
<j@w1.fi>
Tue, 15 Mar 2011 13:54:21 +0000
(15:54 +0200)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
src/common/wpa_ctrl.c
patch
|
blob
|
history
diff --git
a/src/common/wpa_ctrl.c
b/src/common/wpa_ctrl.c
index
546699b
..
88d3a02
100644
(file)
--- a/
src/common/wpa_ctrl.c
+++ b/
src/common/wpa_ctrl.c
@@
-282,6
+282,8
@@
int wpa_ctrl_request(struct wpa_ctrl *ctrl, const char *cmd, size_t cmd_len,
FD_ZERO(&rfds);
FD_SET(ctrl->s, &rfds);
res = select(ctrl->s + 1, &rfds, NULL, NULL, &tv);
+ if (res < 0)
+ return res;
if (FD_ISSET(ctrl->s, &rfds)) {
res = recv(ctrl->s, reply, *reply_len, 0);
if (res < 0)