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
0f151ef1
Commit
0f151ef1
authored
Nov 26, 2009
by
antirez
Browse files
zero length bulk data reading fixed in loadAppendOnlyFile()
parent
85a83172
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
0f151ef1
...
...
@@ -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 */
}
...
...
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