summaryrefslogtreecommitdiff
path: root/hiredis.h
diff options
context:
space:
mode:
authorMichael Grunder <michael.grunder@gmail.com>2020-06-07 14:38:16 -0700
committerGitHub <noreply@github.com>2020-06-07 14:38:16 -0700
commit6448f735d5663c7c58aa269d8f53f06c4640ef5a (patch)
treea7d050ffe5f41cda3b51864a4c612abcd989850c /hiredis.h
parentc7267235455f48e7ce4aa5cb1d0bc0cfe2b7ba09 (diff)
sdsrange overflow fix (#830)
Fix overflow bug in `sdsrange`
Diffstat (limited to 'hiredis.h')
-rw-r--r--hiredis.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/hiredis.h b/hiredis.h
index 9282671..bf10509 100644
--- a/hiredis.h
+++ b/hiredis.h
@@ -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 */