mirror of
https://github.com/fluencelabs/redis
synced 2025-04-25 10:32:14 +00:00
Check if the repeat value is positive in while loop of cliSendCommand().
In case that the incoming repeat parameter is negative and causes a deadless loop.
This commit is contained in:
parent
3f77777ffd
commit
c7197ff50f
@ -980,7 +980,7 @@ static int cliSendCommand(int argc, char **argv, long repeat) {
|
||||
for (j = 0; j < argc; j++)
|
||||
argvlen[j] = sdslen(argv[j]);
|
||||
|
||||
while(repeat--) {
|
||||
while(repeat-- > 0) {
|
||||
redisAppendCommandArgv(context,argc,(const char**)argv,argvlen);
|
||||
while (config.monitor_mode) {
|
||||
if (cliReadReply(output_raw) != REDIS_OK) exit(1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user