fuzzer: No alloc in redisFormatCommand() when fail

master
Björn Svensson 2022-09-01 15:32:53 +02:00 committed by Michael Grunder
parent 329eaf9bae
commit 1abe0c8285
1 changed files with 2 additions and 3 deletions

View File

@ -48,10 +48,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
memcpy(new_str, data, size);
new_str[size] = '\0';
redisFormatCommand(&cmd, new_str);
if (cmd != NULL)
if (redisFormatCommand(&cmd, new_str) != -1)
hi_free(cmd);
free(new_str);
return 0;
}