diff options
author | Leo Murillo <leonardo.murillo@gmail.com> | 2020-01-07 13:55:26 -0600 |
---|---|---|
committer | Leo Murillo <leonardo.murillo@gmail.com> | 2020-01-07 13:55:26 -0600 |
commit | 63e46e5f8db68f3b8b5e0ea6b3b852b1068c9894 (patch) | |
tree | 9591df72648555c29b07b91cdbe92b901b54548f | |
parent | 0af467d18f9d12b137af3b709c0af579c29d8414 (diff) | |
download | redis-63e46e5f8db68f3b8b5e0ea6b3b852b1068c9894.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
@@ -602,7 +602,7 @@ void keysCommand(client *c) { void *replylen = addReplyDeferredLen(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; |