mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
Check select() return value in wpa_ctrl_request()
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
parent
8e8f849f9d
commit
c6a3a11048
@ -282,6 +282,8 @@ int wpa_ctrl_request(struct wpa_ctrl *ctrl, const char *cmd, size_t cmd_len,
|
|||||||
FD_ZERO(&rfds);
|
FD_ZERO(&rfds);
|
||||||
FD_SET(ctrl->s, &rfds);
|
FD_SET(ctrl->s, &rfds);
|
||||||
res = select(ctrl->s + 1, &rfds, NULL, NULL, &tv);
|
res = select(ctrl->s + 1, &rfds, NULL, NULL, &tv);
|
||||||
|
if (res < 0)
|
||||||
|
return res;
|
||||||
if (FD_ISSET(ctrl->s, &rfds)) {
|
if (FD_ISSET(ctrl->s, &rfds)) {
|
||||||
res = recv(ctrl->s, reply, *reply_len, 0);
|
res = recv(ctrl->s, reply, *reply_len, 0);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user