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
04607b53
Commit
04607b53
authored
Jan 07, 2015
by
Jan-Erik Rediger
Browse files
Check that the whole first argument is a number
Fixes #2258
parent
9e718a1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
04607b53
...
@@ -977,9 +977,10 @@ static void repl(void) {
...
@@ -977,9 +977,10 @@ static void repl(void) {
} else {
} else {
long long start_time = mstime(), elapsed;
long long start_time = mstime(), elapsed;
int repeat, skipargs = 0;
int repeat, skipargs = 0;
char *endptr;
repeat
=
a
to
i
(
argv
[
0
]);
repeat =
str
to
l
(argv[0]
, &endptr, 10
);
if
(
argc
>
1
&&
repeat
)
{
if (argc > 1 &&
*endptr == '\0' &&
repeat) {
skipargs = 1;
skipargs = 1;
} else {
} else {
repeat = 1;
repeat = 1;
...
...
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