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
redis
Commits
6739ef44
Commit
6739ef44
authored
Oct 10, 2014
by
Matt Stancliff
Browse files
Sentinel: Add initial quorum bounds check
Fixes #2054
parent
0ed2c601
Changes
1
Show whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
6739ef44
...
...
@@ -2736,6 +2736,12 @@ void sentinelCommand(redisClient *c) {
!=
REDIS_OK
)
return
;
if
(
getLongFromObjectOrReply
(
c
,
c
->
argv
[
4
],
&
port
,
"Invalid port"
)
!=
REDIS_OK
)
return
;
if
(
quorum
<=
0
)
{
addReplyError
(
c
,
"Quorum must be 1 or greater."
);
return
;
}
/* Make sure the IP field is actually a valid IP before passing it
* to createSentinelRedisInstance(), otherwise we may trigger a
* DNS lookup at runtime. */
...
...
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