diff options
author | Leo Murillo <leonardo.murillo@gmail.com> | 2020-01-07 13:55:26 -0600 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2020-03-05 16:26:32 +0100 |
commit | f3b77510effad00db8554331a257e93968a977c2 (patch) | |
tree | 7e39eb2da4800274787f181b38ac72faf11427b2 | |
parent | 7f3fcedb8ca14a557074bf679f77a6eef97b9b81 (diff) | |
download | redis-f3b77510effad00db8554331a257e93968a977c2.tar.gz |
Fix bug on KEYS command where pattern starts with * followed by \x00 (null char).
-rw-r--r-- | src/db.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -542,7 +542,7 @@ void keysCommand(client *c) { void *replylen = addDeferredMultiBulkLength(c); di = dictGetSafeIterator(c->db->dict); - allkeys = (pattern[0] == '*' && pattern[1] == '\0'); + allkeys = (pattern[0] == '*' && plen == 1); while((de = dictNext(di)) != NULL) { sds key = dictGetKey(de); robj *keyobj; |