diff --git a/src/networking.c b/src/networking.c index 91bd5a6b..605621c1 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 5578f1fd..0edb25d8 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:"