From 6448f735d5663c7c58aa269d8f53f06c4640ef5a Mon Sep 17 00:00:00 2001 From: Michael Grunder Date: Sun, 7 Jun 2020 14:38:16 -0700 Subject: sdsrange overflow fix (#830) Fix overflow bug in `sdsrange` --- ssl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ssl.c') diff --git a/ssl.c b/ssl.c index f3870d5..10cf607 100644 --- a/ssl.c +++ b/ssl.c @@ -392,7 +392,7 @@ static void redisSSLFree(void *privdata){ hi_free(rsc); } -static int redisSSLRead(redisContext *c, char *buf, size_t bufcap) { +static ssize_t redisSSLRead(redisContext *c, char *buf, size_t bufcap) { redisSSL *rssl = c->privdata; int nread = SSL_read(rssl->ssl, buf, bufcap); @@ -434,7 +434,7 @@ static int redisSSLRead(redisContext *c, char *buf, size_t bufcap) { } } -static int redisSSLWrite(redisContext *c) { +static ssize_t redisSSLWrite(redisContext *c) { redisSSL *rssl = c->privdata; size_t len = rssl->lastLen ? rssl->lastLen : sdslen(c->obuf); -- cgit v1.2.3