summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fuzz/wget_read_hunk_fuzzer.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fuzz/wget_read_hunk_fuzzer.c b/fuzz/wget_read_hunk_fuzzer.c
index a27b91dc..da462980 100644
--- a/fuzz/wget_read_hunk_fuzzer.c
+++ b/fuzz/wget_read_hunk_fuzzer.c
@@ -74,14 +74,15 @@ struct my_context {
char peekbuf[512];
};
-static int my_peek (int fd _GL_UNUSED, char *buf, int bufsize, void *arg)
+static int my_peek (int fd _GL_UNUSED, char *buf, int bufsize, void *arg, double d)
{
+ (void) d;
if (g_read < g_size) {
struct my_context *ctx = (struct my_context *) arg;
int n = rand() % (g_size - g_read);
if (n > bufsize)
n = bufsize;
- if (n > sizeof(ctx->peekbuf))
+ if (n > (int) sizeof(ctx->peekbuf))
n = sizeof(ctx->peekbuf);
memcpy(buf, g_data + g_read, n);
memcpy(ctx->peekbuf, g_data + g_read, n);
@@ -91,8 +92,9 @@ static int my_peek (int fd _GL_UNUSED, char *buf, int bufsize, void *arg)
}
return 0;
}
-static int my_read (int fd _GL_UNUSED, char *buf, int bufsize, void *arg)
+static int my_read (int fd _GL_UNUSED, char *buf, int bufsize, void *arg, double d)
{
+ (void) d;
struct my_context *ctx = (struct my_context *) arg;
if (ctx->peeklen) {