Commit 0f151ef1 authored by antirez's avatar antirez
Browse files

zero length bulk data reading fixed in loadAppendOnlyFile()

parent 85a83172
......@@ -5740,7 +5740,7 @@ int loadAppendOnlyFile(char *filename) {
if (buf[0] != '$') goto fmterr;
len = strtol(buf+1,NULL,10);
argsds = sdsnewlen(NULL,len);
if (fread(argsds,len,1,fp) == 0) goto fmterr;
if (len && fread(argsds,len,1,fp) == 0) goto fmterr;
argv[j] = createObject(REDIS_STRING,argsds);
if (fread(buf,2,1,fp) == 0) goto fmterr; /* discard CRLF */
}
......
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