Nick Wellnhofer
c6c6d8afef
fuzz: Mutate fuzz data chunks separately
...
Implement a custom mutator that takes a list of fixed-size chunks which
are mutated with a given probability. This makes sure that values like
parser options or failure position are mutated regularly even as the
fuzz data grows large. Values can also be adjusted temporarily to make
the fuzzer focus on failure injection, for example.
Thanks to David Kilzer for the idea.
2025-02-20 12:22:12 +01:00
Nick Wellnhofer
bc43786822
fuzz: Improve HTML fuzzer
...
Verify that pull and push parser produce the same result.
Fixes #849 .
2025-02-02 11:15:45 +01:00
Nick Wellnhofer
9f652e57c1
fuzz: Inject IO failures
...
We use the same counter for injecting malloc and IO failures. This
mostly renames several functions and variables.
2024-11-26 14:30:54 +01:00
Nick Wellnhofer
780e432a5c
fuzz: Move to per-context error handler
2024-06-12 16:36:12 +02:00
Nick Wellnhofer
ee0c1f87c0
fuzz: New tree API fuzzer
2024-03-15 19:54:27 +01:00
Nick Wellnhofer
30d839776a
fuzz: Disable catalogs
...
The catalogs API doesn't report OOM errors. It's basically impossible
to use it safely in its current form.
2024-01-04 15:18:14 +01:00
Nick Wellnhofer
abd74186f9
html: Report malloc failures
...
Fix many places where malloc failures aren't reported.
Stop checking for ctxt->instate.
2023-12-11 22:13:06 +01:00
Nick Wellnhofer
f9d717af97
fuzz: Allow to fuzz without push, reader or output modules
2023-09-21 13:05:49 +02:00
Nick Wellnhofer
da274bfa55
build: Fix build when certain modules are disabled
2023-09-21 02:26:43 +02:00
Nick Wellnhofer
42322eba82
fuzz: Inject random malloc failures
...
Fixes #344 .
2023-03-08 14:14:22 +01:00
Nick Wellnhofer
541b1e2850
fuzz: Support variable integer sizes in fuzz data
...
Also switch to big-endian.
2023-03-08 13:59:00 +01:00
Nick Wellnhofer
d0ab5c4fe6
Fix compiler warnings in fuzzing code
2022-09-02 18:33:36 +02:00
Nick Wellnhofer
85c817a200
Improve fuzzer stability
...
- Add more calls to xmlInitializeCatalog.
- Call xmlResetLastError after fuzzing each input.
2021-02-22 22:29:28 +01:00
Nick Wellnhofer
7a90bdfae6
Another attempt at improving fuzzer stability
...
xmlInitializeCatalog is not called from xmlInitParser.
2021-02-22 17:58:06 +01:00
Nick Wellnhofer
0fb3ae5840
Revert "Improve HTML fuzzer stability"
...
This reverts commit de1b51eddc .
2021-02-22 17:31:05 +01:00
Nick Wellnhofer
de1b51eddc
Improve HTML fuzzer stability
...
Call htmlInitAutoClose during fuzzer initialization to fix stability
issue. Leave a note concerning problems with this function.
2021-02-22 13:21:38 +01:00
Nick Wellnhofer
ec808a4415
Speed up HTML fuzzer
...
htmlDocDumpMemory uses the "HTML" encoding if no other encoding was
specified in the source HTML. This encoding can be extremely slow
because of an inefficiency in htmlEntityValueLookup. Stop encoding
the output for now.
2021-02-07 14:39:55 +01:00
Nick Wellnhofer
536f421d37
Fuzz target for HTML parser
2020-06-15 15:23:38 +02:00