Fuzzer: The return value of malloc is void *, it does not need to be forced to change the type

Signed-off-by: Li zeming <zeming@nfschina.com>
This commit is contained in:
Li zeming 2022-09-13 12:25:27 +08:00
parent 307c053b9b
commit c585e21a10

View File

@ -31,7 +31,7 @@ int main(int argc, char **argv) {
fseek(f, 0, SEEK_END);
size_t len = ftell(f);
fseek(f, 0, SEEK_SET);
unsigned char *buf = (unsigned char*)malloc(len);
unsigned char *buf = malloc(len);
size_t n_read = fread(buf, 1, len, f);
assert(n_read == len);
LLVMFuzzerTestOneInput(buf, len);