X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/39d1e350d9fe07babfe0758ce539b085e33206aa..d12a68d4158ba308b3e153158a0affa80c5fa9eb:/src/config.c?ds=inline diff --git a/src/config.c b/src/config.c index 4d35521d..c2ea5b76 100644 --- a/src/config.c +++ b/src/config.c @@ -155,6 +155,9 @@ void loadServerConfigFromString(char *config) { loadServerConfig(argv[1],NULL); } else if (!strcasecmp(argv[0],"maxclients") && argc == 2) { server.maxclients = atoi(argv[1]); + if (server.maxclients < 1) { + err = "Invalid max clients limit"; goto loaderr; + } } else if (!strcasecmp(argv[0],"maxmemory") && argc == 2) { server.maxmemory = memtoll(argv[1],NULL); } else if (!strcasecmp(argv[0],"maxmemory-policy") && argc == 2) {