Skip to content

Commit c6a3a11

Browse files
Dmitry Shmidtjmalinen
Dmitry Shmidt
authored andcommitted
Check select() return value in wpa_ctrl_request()
Signed-off-by: Dmitry Shmidt <[email protected]>
1 parent 8e8f849 commit c6a3a11

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/common/wpa_ctrl.c

+2
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ int wpa_ctrl_request(struct wpa_ctrl *ctrl, const char *cmd, size_t cmd_len,
282282
FD_ZERO(&rfds);
283283
FD_SET(ctrl->s, &rfds);
284284
res = select(ctrl->s + 1, &rfds, NULL, NULL, &tv);
285+
if (res < 0)
286+
return res;
285287
if (FD_ISSET(ctrl->s, &rfds)) {
286288
res = recv(ctrl->s, reply, *reply_len, 0);
287289
if (res < 0)

0 commit comments

Comments
 (0)