Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
18be93e0
Commit
18be93e0
authored
Sep 20, 2011
by
Salvatore Sanfilippo
Browse files
Merge pull request #74 from kmerenkov/issue_620
[issue 620] don't segfault if number of arguments is less than 1
parents
eef17490
be6f6395
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/aof.c
View file @
18be93e0
...
...
@@ -326,6 +326,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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment