From 3d92926a902017e7cf1f5738e99ff62da596ce12 Mon Sep 17 00:00:00 2001 From: Ethan Werner Date: Sun, 9 Aug 2026 15:02:21 +0400 Subject: refactor --- test/fuzz.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test/fuzz.c') diff --git a/test/fuzz.c b/test/fuzz.c index 3f11d9d..49964b1 100644 --- a/test/fuzz.c +++ b/test/fuzz.c @@ -1,3 +1,4 @@ +#define _POSIX_C_SOURCE 200809L #include "ts.h" #include #include @@ -62,7 +63,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) if (xn > 5) xn = 5; if (yn > 3) yn = 3; - (void)entry.func(y_arrays, yn, (fp_t const * const *)x_arrays, xn, n, (ts_constant_t *)&period); + ts_constant_t c; + memset(&c, 0, sizeof(c)); + memcpy(c.data, &period, sizeof(period)); + (void)entry.func(y_arrays, yn, (fp_t const * const *)x_arrays, xn, n, &c); return 0; } -- cgit v1.3.1