Commit f3b77510 authored by Leo Murillo's avatar Leo Murillo Committed by antirez
Browse files

Fix bug on KEYS command where pattern starts with * followed by \x00 (null char).

parent 7f3fcedb
...@@ -542,7 +542,7 @@ void keysCommand(client *c) { ...@@ -542,7 +542,7 @@ void keysCommand(client *c) {
void *replylen = addDeferredMultiBulkLength(c); void *replylen = addDeferredMultiBulkLength(c);
di = dictGetSafeIterator(c->db->dict); di = dictGetSafeIterator(c->db->dict);
allkeys = (pattern[0] == '*' && pattern[1] == '\0'); allkeys = (pattern[0] == '*' && plen == 1);
while((de = dictNext(di)) != NULL) { while((de = dictNext(di)) != NULL) {
sds key = dictGetKey(de); sds key = dictGetKey(de);
robj *keyobj; robj *keyobj;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment