From 5aeb1f71a34e987949e29689b0eb2e0ca87f1d71 Mon Sep 17 00:00:00 2001 From: charsyam Date: Tue, 5 Feb 2013 21:47:14 -0800 Subject: [PATCH] Don't segfault on unbalanced quotes. --- src/config.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/config.c b/src/config.c index 20f3c413..7825ea84 100644 --- a/src/config.c +++ b/src/config.c @@ -73,6 +73,10 @@ void loadServerConfigFromString(char *config) { /* Split into arguments */ argv = sdssplitargs(lines[i],&argc); + if (argv == NULL) { + err = "can't parse this line"; + goto loaderr; + } sdstolower(argv[0]); /* Execute config directives */