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
c65b75e7
Commit
c65b75e7
authored
Mar 14, 2014
by
Salvatore Sanfilippo
Browse files
Merge pull request #1608 from mattsta/fix-sentinel-current-epoch-segfault
Fix segfault from accessing array out of bounds
parents
ed813863
584052ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
c65b75e7
...
...
@@ -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