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
584052ee
Commit
584052ee
authored
Mar 14, 2014
by
Matt Stancliff
Browse files
Fix segfault from accessing array out of bounds
argc == 2; argv[2] == crash
parent
ed813863
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
584052ee
...
...
@@ -1346,7 +1346,7 @@ char *sentinelHandleConfiguration(char **argv, int argc) {
ri->auth_pass = sdsnew(argv[2]);
} else if (!strcasecmp(argv[0],"current-epoch") && argc == 2) {
/* current-epoch <epoch> */
unsigned
long
long
current_epoch
=
strtoull
(
argv
[
2
],
NULL
,
10
);
unsigned long long current_epoch = strtoull(argv[
1
],NULL,10);
if (current_epoch > sentinel.current_epoch)
sentinel.current_epoch = current_epoch;
} else if (!strcasecmp(argv[0],"config-epoch") && argc == 3) {
...
...
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