]> git.saurik.com Git - redis.git/blobdiff - src/config.c
cr16.c removed from 2.6 branch, was not used.
[redis.git] / src / config.c
index 4d35521d742b4f5fd18407aed0caa60c168a4cec..c2ea5b76816c0fcb278e5bb2572e2f6a0c4a9acb 100644 (file)
@@ -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) {