mirror of
https://github.com/fluencelabs/redis
synced 2025-04-02 15:51:05 +00:00
Merge pull request #5304 from soloestoy/fix-unexpected-readlen
networking: fix unexpected negative or zero readlen
This commit is contained in:
commit
2ef829d65c
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user