diff options
author | antirez <antirez@gmail.com> | 2013-05-15 11:15:18 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2013-05-15 11:15:31 +0200 |
commit | c590e18d15bed4dc576c86bc4b10eed2b0997e15 (patch) | |
tree | 128fc4014390f66cbd3fabab272e1a7eab7ce65f | |
parent | 328843849f070c5cbdf154b7a96da6dcd317bdd6 (diff) | |
download | redis-c590e18d15bed4dc576c86bc4b10eed2b0997e15.tar.gz |
CONFIG REWRITE: correctly escape the notify-keyspace-events option.
-rw-r--r-- | src/config.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c index 0b03e0de1..57905f649 100644 --- a/src/config.c +++ b/src/config.c @@ -1381,7 +1381,9 @@ void rewriteConfigNotifykeyspaceeventsOption(struct rewriteConfigState *state) { sds line, flags; flags = keyspaceEventsFlagsToString(server.notify_keyspace_events); - line = sdscatprintf(sdsempty(),"%s %s", option, flags); + line = sdsnew(option); + line = sdscatlen(line, " ", 1); + line = sdscatrepr(line, flags, sdslen(flags)); sdsfree(flags); rewriteConfigRewriteLine(state,option,line,force); } |