Unverified Commit 542455ce authored by Bob Li's avatar Bob Li Committed by GitHub
Browse files

Fix overflow of rdbWriteRaw return value (#8306)

Saving string of more than 2GB to the RDB file, can result in corrupt RDB, or failure in rdbSave.
S
parent fe2fdef7
......@@ -94,7 +94,7 @@ void rdbReportError(int corruption_error, int linenum, char *reason, ...) {
exit(1);
}
static int rdbWriteRaw(rio *rdb, void *p, size_t len) {
static ssize_t rdbWriteRaw(rio *rdb, void *p, size_t len) {
if (rdb && rioWrite(rdb,p,len) == 0)
return -1;
return len;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment