Skip to content

Commit dd8486f

Browse files
committed
platform: posix: Correct posix_fuzz_sz to size_t to prevent truncation
The fuzzer's payload size posix_fuzz_sz is provided by libFuzzer as a size_t. Declaring it as a uint8_t in the ipc test harness resulted in silent payload truncation (maximum 255 bytes) causing incomplete corpus generation. This corrects the types between fuzz.c and ipc.c. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent 6752df4 commit dd8486f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/platform/posix/ipc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ static void posix_ipc_isr(void *arg)
2424
}
2525

2626
// External symbols set up by the fuzzing layer
27-
extern uint8_t *posix_fuzz_buf, posix_fuzz_sz;
27+
extern const uint8_t *posix_fuzz_buf;
28+
extern size_t posix_fuzz_sz;
2829

2930
// Lots of space. Should really synchronize with the -max_len
3031
// parameter to libFuzzer (defaults to 4096), but that requires

0 commit comments

Comments
 (0)