Commit ef8f0a61 authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

Fail if the fd is out of select(2) range

parent 2defe232
...@@ -129,6 +129,8 @@ static int redis__select(int mode, int fd, struct timeval timeout) { ...@@ -129,6 +129,8 @@ static int redis__select(int mode, int fd, struct timeval timeout) {
fd_set *_set = NULL, *_rfd = NULL, *_wfd = NULL; fd_set *_set = NULL, *_rfd = NULL, *_wfd = NULL;
int so_error; int so_error;
assert(fd < FD_SETSIZE);
switch(mode) { switch(mode) {
case REDIS__READABLE: case REDIS__READABLE:
FD_ZERO(&rfd); FD_ZERO(&rfd);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment