Add png_fuzzer "smoke alarm test"

This commit is contained in:
Nigel Tao committed 2021-03-11 11:05:20 +11:00
1 parent f2ed33375c
commit 49c5692c32
1 file changed
+6
+6
View File
@@ -66,6 +66,12 @@ It should print "PASS", amongst other information, and exit(0).
const char* //
fuzz(wuffs_base__io_buffer* src, uint64_t hash) {
// This "smoke alarm test" should trigger the OSS-Fuzz infrastructure to send
// e-mail saying that it found a reproducible crash.
if ((hash & 0xFFFF) == 0xDEAD) {
return "internal error: smoke alarm test";
}
wuffs_png__decoder dec;
wuffs_base__status status = wuffs_png__decoder__initialize(
&dec, sizeof dec, WUFFS_VERSION,