[6.0] 10303d7d4 Polish
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Thu Aug 16 08:52:48 UTC 2018
commit 10303d7d4935e6da1a933007506f55695fd17d1e
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Mon Apr 23 11:10:45 2018 +0100
Polish
diff --git a/bin/varnishd/fuzzers/esi_parse_fuzzer.c b/bin/varnishd/fuzzers/esi_parse_fuzzer.c
index 049d98a6d..c09c888ba 100644
--- a/bin/varnishd/fuzzers/esi_parse_fuzzer.c
+++ b/bin/varnishd/fuzzers/esi_parse_fuzzer.c
@@ -55,14 +55,6 @@ VSLb(struct vsl_log *vsl, enum VSL_tag_e tag, const char *fmt, ...)
(void)fmt;
}
-
-void *
-WS_Alloc(struct ws *ws, unsigned bytes)
-{
- (void)ws;
- return (calloc(1, bytes));
-}
-
void
VSLb_ts(struct vsl_log *l, const char *event, double first, double *pprev,
double now)
@@ -74,6 +66,13 @@ VSLb_ts(struct vsl_log *l, const char *event, double first, double *pprev,
(void)now;
}
+void *
+WS_Alloc(struct ws *ws, unsigned bytes)
+{
+ (void)ws;
+ return (calloc(1, bytes));
+}
+
int
LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
@@ -90,6 +89,8 @@ LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
if (size < 1)
return (0);
+ AN(data);
+
VSC_C_main = &__VSC_C_main;
cache_param = &__cache_param;
@@ -124,8 +125,8 @@ main(int argc, char **argv)
int i;
for (i = 1; i < argc; i++) {
+ len = 0;
buf = VFIL_readfile(NULL, argv[i], &len);
- AN(buf);
LLVMFuzzerTestOneInput((uint8_t *)buf, len);
free(buf);
}
More information about the varnish-commit
mailing list