summaryrefslogtreecommitdiffstats
path: root/test/fuzz.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/fuzz.c')
-rw-r--r--test/fuzz.c6
1 files changed, 5 insertions, 1 deletions
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 <stdint.h>
#include <stdlib.h>
@@ -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;
}