Fix stringmatchlen() read past buffer bug.

See #5632.
This commit is contained in:
antirez 2018-12-11 13:18:52 +01:00
parent 97192e2d88
commit 49d9f4116b

View File

@ -47,7 +47,7 @@
int stringmatchlen(const char *pattern, int patternLen,
const char *string, int stringLen, int nocase)
{
while(patternLen) {
while(patternLen && stringLen) {
switch(pattern[0]) {
case '*':
while (pattern[1] == '*') {