diff options
author | Michael Grunder <michael.grunder@gmail.com> | 2020-06-07 14:38:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-07 14:38:16 -0700 |
commit | 6448f735d5663c7c58aa269d8f53f06c4640ef5a (patch) | |
tree | a7d050ffe5f41cda3b51864a4c612abcd989850c /hiredis.h | |
parent | c7267235455f48e7ce4aa5cb1d0bc0cfe2b7ba09 (diff) |
sdsrange overflow fix (#830)
Fix overflow bug in `sdsrange`
Diffstat (limited to 'hiredis.h')
-rw-r--r-- | hiredis.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -39,6 +39,7 @@ #include <sys/time.h> /* for struct timeval */ #else struct timeval; /* forward declaration */ +typedef long long ssize_t; #endif #include <stdint.h> /* uintXX_t, etc */ #include "sds.h" /* for sds */ @@ -200,8 +201,8 @@ typedef struct redisContextFuncs { void (*free_privdata)(void *); void (*async_read)(struct redisAsyncContext *); void (*async_write)(struct redisAsyncContext *); - int (*read)(struct redisContext *, char *, size_t); - int (*write)(struct redisContext *); + ssize_t (*read)(struct redisContext *, char *, size_t); + ssize_t (*write)(struct redisContext *); } redisContextFuncs; /* Context for a connection to Redis */ |