summaryrefslogtreecommitdiff
path: root/src/rio.c
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2017-12-21 11:10:48 +0200
committerOran Agra <oran@redislabs.com>2017-12-29 12:24:19 +0200
commit60a4f12f8b998c44dfff0e88202b01598287390d (patch)
tree8da45dd584c02f85d97119f163802686444256d8 /src/rio.c
parent0b561883b48db76a78497b1bebfd9367c80e2d96 (diff)
downloadredis-60a4f12f8b998c44dfff0e88202b01598287390d.tar.gz
fix processing of large bulks (above 2GB)
- protocol parsing (processMultibulkBuffer) was limitted to 32big positions in the buffer readQueryFromClient potential overflow - rioWriteBulkCount used int, although rioWriteBulkString gave it size_t - several places in sds.c that used int for string length or index. - bugfix in RM_SaveAuxField (return was 1 or -1 and not length) - RM_SaveStringBuffer was limitted to 32bit length
Diffstat (limited to 'src/rio.c')
-rw-r--r--src/rio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rio.c b/src/rio.c
index 9c7220fcc..23b907060 100644
--- a/src/rio.c
+++ b/src/rio.c
@@ -310,7 +310,7 @@ void rioSetAutoSync(rio *r, off_t bytes) {
* generating the Redis protocol for the Append Only File. */
/* Write multi bulk count in the format: "*<count>\r\n". */
-size_t rioWriteBulkCount(rio *r, char prefix, int count) {
+size_t rioWriteBulkCount(rio *r, char prefix, long count) {
char cbuf[128];
int clen;