1
0
mirror of https://github.com/fluencelabs/redis synced 2025-07-17 17:41:56 +00:00

Prevent off-by-one read in stringmatchlen() (fixes )

This commit is contained in:
nashe
2017-12-12 01:25:03 +01:00
committed by antirez
parent 733af14822
commit 8eeceabdc2

@@ -84,7 +84,7 @@ int stringmatchlen(const char *pattern, int patternLen,
}
match = 0;
while(1) {
if (pattern[0] == '\\') {
if (pattern[0] == '\\' && patternLen >= 2) {
pattern++;
patternLen--;
if (pattern[0] == string[0])