summaryrefslogtreecommitdiff
path: root/src/aof.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/aof.c')
-rw-r--r--src/aof.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/aof.c b/src/aof.c
index fdbc124ad..6b58a6b18 100644
--- a/src/aof.c
+++ b/src/aof.c
@@ -327,6 +327,8 @@ int loadAppendOnlyFile(char *filename) {
}
if (buf[0] != '*') goto fmterr;
argc = atoi(buf+1);
+ if (argc < 1) goto fmterr;
+
argv = zmalloc(sizeof(robj*)*argc);
for (j = 0; j < argc; j++) {
if (fgets(buf,sizeof(buf),fp) == NULL) goto readerr;