Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
2017d8ba
Commit
2017d8ba
authored
Aug 02, 2011
by
Konstantin Merenkov
Committed by
antirez
Sep 20, 2011
Browse files
[issue 620] don't segfault if number of arguments is less than 1
parent
a511ce1b
Changes
1
Show whitespace changes
Inline
Side-by-side
src/aof.c
View file @
2017d8ba
...
...
@@ -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
;
...
...
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