X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/0d83011a11b42fe1b0d1bebb7b9a3318fd44f0e5..a5f8341245aeebd22a2474e92c4ed497eae01545:/src/config.c diff --git a/src/config.c b/src/config.c index 9899dfbc..6f98e5e5 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) {