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
d8899fbc
Commit
d8899fbc
authored
Oct 15, 2020
by
Alex Smith
Committed by
michael-grunder
Feb 25, 2021
Browse files
read: Add additional RESP3 nil validation
RESP3 nil should consist of "_\r\n" and nothing else.
parent
96e8ea61
Changes
1
Hide whitespace changes
Inline
Side-by-side
read.c
View file @
d8899fbc
...
@@ -320,6 +320,12 @@ static int processLineItem(redisReader *r) {
...
@@ -320,6 +320,12 @@ static int processLineItem(redisReader *r) {
obj
=
(
void
*
)
REDIS_REPLY_DOUBLE
;
obj
=
(
void
*
)
REDIS_REPLY_DOUBLE
;
}
}
}
else
if
(
cur
->
type
==
REDIS_REPLY_NIL
)
{
}
else
if
(
cur
->
type
==
REDIS_REPLY_NIL
)
{
if
(
len
!=
0
)
{
__redisReaderSetError
(
r
,
REDIS_ERR_PROTOCOL
,
"Bad nil value"
);
return
REDIS_ERR
;
}
if
(
r
->
fn
&&
r
->
fn
->
createNil
)
if
(
r
->
fn
&&
r
->
fn
->
createNil
)
obj
=
r
->
fn
->
createNil
(
cur
);
obj
=
r
->
fn
->
createNil
(
cur
);
else
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