summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-09-04 13:26:06 +0200
committerantirez <antirez@gmail.com>2018-09-04 13:26:06 +0200
commitff57b8d550b4ef90f33dc89d7179b05ad6d1258d (patch)
tree420cd4156e29e284d32460c996eaebd737543475
parentc1e9186f069e0b3aa1507e0e86a16d5001ea5420 (diff)
parent2ef829d65c1174438d33ca91bc4b9284639ad742 (diff)
downloadredis-ff57b8d550b4ef90f33dc89d7179b05ad6d1258d.tar.gz
Merge branch 'unstable' of github.com:/antirez/redis into unstable
-rw-r--r--src/networking.c2
-rw-r--r--tests/support/server.tcl2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/networking.c b/src/networking.c
index 91bd5a6b9..605621c1c 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -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);
- if (remaining < readlen) readlen = remaining;
+ if (remaining > 0 && remaining < readlen) readlen = remaining;
}
qblen = sdslen(c->querybuf);
diff --git a/tests/support/server.tcl b/tests/support/server.tcl
index 5578f1fd6..0edb25d8a 100644
--- a/tests/support/server.tcl
+++ b/tests/support/server.tcl
@@ -4,7 +4,7 @@ set ::valgrind_errors {}
proc start_server_error {config_file error} {
set err {}
- append err "Cant' start the Redis server\n"
+ append err "Can't start the Redis server\n"
append err "CONFIGURATION:"
append err [exec cat $config_file]
append err "\nERROR:"