Jump to right label on AOF parsing error.
Related to #6054. Former-commit-id: c7159d58f118e840a3b9f72160d1abf3e8a86b3d
This commit is contained in:
parent
0fac746f0e
commit
eafcca9f29
@ -815,12 +815,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);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user