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
hiredis
Commits
c6646cb1
Commit
c6646cb1
authored
Oct 16, 2020
by
Alex Smith
Committed by
michael-grunder
Feb 25, 2021
Browse files
read: Ensure no invalid '\r' or '\n' in simple status/error strings
parent
e4306115
Changes
1
Hide whitespace changes
Inline
Side-by-side
read.c
View file @
c6646cb1
...
...
@@ -339,6 +339,13 @@ static int processLineItem(redisReader *r) {
obj
=
(
void
*
)
REDIS_REPLY_BOOL
;
}
else
{
/* Type will be error or status. */
for
(
int
i
=
0
;
i
<
len
;
i
++
)
{
if
(
p
[
i
]
==
'\r'
||
p
[
i
]
==
'\n'
)
{
__redisReaderSetError
(
r
,
REDIS_ERR_PROTOCOL
,
"Bad simple string value"
);
return
REDIS_ERR
;
}
}
if
(
r
->
fn
&&
r
->
fn
->
createString
)
obj
=
r
->
fn
->
createString
(
cur
,
p
,
len
);
else
...
...
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