Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
f43eb5ad
Commit
f43eb5ad
authored
Dec 12, 2017
by
nashe
Browse files
Prevent off-by-one read in stringmatchlen() (fixes #4527)
parent
522760fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/util.c
View file @
f43eb5ad
...
...
@@ -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
])
...
...
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