Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
ef8f0a61
Commit
ef8f0a61
authored
Jan 20, 2012
by
Pieter Noordhuis
Browse files
Fail if the fd is out of select(2) range
parent
2defe232
Changes
1
Hide whitespace changes
Inline
Side-by-side
handle.c
View file @
ef8f0a61
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment