Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
8eeceabd
Commit
8eeceabd
authored
Dec 12, 2017
by
nashe
Committed by
antirez
Jan 09, 2018
Browse files
Prevent off-by-one read in stringmatchlen() (fixes #4527)
parent
733af148
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/util.c
View file @
8eeceabd
...
@@ -84,7 +84,7 @@ int stringmatchlen(const char *pattern, int patternLen,
...
@@ -84,7 +84,7 @@ int stringmatchlen(const char *pattern, int patternLen,
}
}
match
=
0
;
match
=
0
;
while
(
1
)
{
while
(
1
)
{
if
(
pattern
[
0
]
==
'\\'
)
{
if
(
pattern
[
0
]
==
'\\'
&&
patternLen
>=
2
)
{
pattern
++
;
pattern
++
;
patternLen
--
;
patternLen
--
;
if
(
pattern
[
0
]
==
string
[
0
])
if
(
pattern
[
0
]
==
string
[
0
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment