diff options
author | Oran Agra <oran@redislabs.com> | 2017-12-21 11:10:48 +0200 |
---|---|---|
committer | Oran Agra <oran@redislabs.com> | 2017-12-29 12:24:19 +0200 |
commit | 60a4f12f8b998c44dfff0e88202b01598287390d (patch) | |
tree | 8da45dd584c02f85d97119f163802686444256d8 /src/sds.h | |
parent | 0b561883b48db76a78497b1bebfd9367c80e2d96 (diff) | |
download | redis-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/sds.h')
-rw-r--r-- | src/sds.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -236,11 +236,11 @@ sds sdscatprintf(sds s, const char *fmt, ...); sds sdscatfmt(sds s, char const *fmt, ...); sds sdstrim(sds s, const char *cset); -void sdsrange(sds s, int start, int end); +void sdsrange(sds s, ssize_t start, ssize_t end); void sdsupdatelen(sds s); void sdsclear(sds s); int sdscmp(const sds s1, const sds s2); -sds *sdssplitlen(const char *s, int len, const char *sep, int seplen, int *count); +sds *sdssplitlen(const char *s, ssize_t len, const char *sep, int seplen, int *count); void sdsfreesplitres(sds *tokens, int count); void sdstolower(sds s); void sdstoupper(sds s); @@ -253,7 +253,7 @@ sds sdsjoinsds(sds *argv, int argc, const char *sep, size_t seplen); /* Low level functions exposed to the user API */ sds sdsMakeRoomFor(sds s, size_t addlen); -void sdsIncrLen(sds s, int incr); +void sdsIncrLen(sds s, ssize_t incr); sds sdsRemoveFreeSpace(sds s); size_t sdsAllocSize(sds s); void *sdsAllocPtr(sds s); |