Merge pull request #5870 from fengweiyuan/5.0

fix corrupt_rdb.c bug.Let the name of input rdb file name be valid.
This commit is contained in:
Salvatore Sanfilippo 2019-03-01 16:57:13 +01:00 committed by GitHub
commit bd7ddd79dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,8 +21,9 @@ int main(int argc, char **argv) {
}
srand(time(NULL));
char *filename = argv[1];
cycles = atoi(argv[2]);
fd = open("dump.rdb",O_RDWR);
fd = open(filename,O_RDWR);
if (fd == -1) {
perror("open");
exit(1);