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
60870d3a
Commit
60870d3a
authored
Jan 13, 2020
by
antirez
Browse files
Jump to right label on AOF parsing error.
Related to #6054.
parent
d90f599b
Changes
1
Show whitespace changes
Inline
Side-by-side
src/aof.c
View file @
60870d3a
...
@@ -782,12 +782,14 @@ int loadAppendOnlyFile(char *filename) {
...
@@ -782,12 +782,14 @@ int loadAppendOnlyFile(char *filename) {
for (j = 0; j < argc; j++) {
for (j = 0; j < argc; j++) {
/* Parse the argument len. */
/* Parse the argument len. */
if (fgets(buf,sizeof(buf),fp) == NULL ||
char *readres = fgets(buf,sizeof(buf),fp);
buf[0] != '$')
if (readres == NULL || buf[0] != '$') {
{
fakeClient->argc = j; /* Free up to j-1. */
fakeClient->argc = j; /* Free up to j-1. */
freeFakeClientArgv(fakeClient);
freeFakeClientArgv(fakeClient);
if (readres == NULL)
goto readerr;
goto readerr;
else
goto fmterr;
}
}
len = strtol(buf+1,NULL,10);
len = strtol(buf+1,NULL,10);
...
...
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