From 2e14d125baa2c4515ccfd1b81c34e20ae9e7d99c Mon Sep 17 00:00:00 2001 From: cpq Date: Tue, 18 Oct 2022 15:21:59 +0100 Subject: [PATCH] Fuzzer nits --- test/fuzz.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/fuzz.c b/test/fuzz.c index be35d051..8c4141ea 100644 --- a/test/fuzz.c +++ b/test/fuzz.c @@ -67,7 +67,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if_init(ifp, &mgr, &cfg, &mip_driver_mock, NULL, pktlen, 0); // Make a copy of the random data, in order to modify it - uint8_t *pkt = malloc(size); + void *pkt = malloc(size); struct eth *eth = (struct eth *) pkt; memcpy(pkt, data, size); if (size > sizeof(*eth)) { @@ -78,7 +78,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (i >= sizeof(eth_types) / sizeof(eth_types[0])) i = 0; } - mip_rx(ifp, (void *) pkt, size); + mip_rx(ifp, pkt, size); mgr.priv = NULL; // Don't let Mongoose free() ifp mg_mgr_free(&mgr); free(pkt);