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
2ef829d6
Unverified
Commit
2ef829d6
authored
Sep 04, 2018
by
Salvatore Sanfilippo
Committed by
GitHub
Sep 04, 2018
Browse files
Merge pull request #5304 from soloestoy/fix-unexpected-readlen
networking: fix unexpected negative or zero readlen
parents
e4298d11
dce7cefb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networking.c
View file @
2ef829d6
...
@@ -1466,7 +1466,7 @@ void readQueryFromClient(aeEventLoop *el, int fd, void *privdata, int mask) {
...
@@ -1466,7 +1466,7 @@ void readQueryFromClient(aeEventLoop *el, int fd, void *privdata, int mask) {
{
{
ssize_t
remaining
=
(
size_t
)(
c
->
bulklen
+
2
)
-
sdslen
(
c
->
querybuf
);
ssize_t
remaining
=
(
size_t
)(
c
->
bulklen
+
2
)
-
sdslen
(
c
->
querybuf
);
if
(
remaining
<
readlen
)
readlen
=
remaining
;
if
(
remaining
>
0
&&
remaining
<
readlen
)
readlen
=
remaining
;
}
}
qblen
=
sdslen
(
c
->
querybuf
);
qblen
=
sdslen
(
c
->
querybuf
);
...
...
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