From 49c5692c32f47d23628ebf436167acd864b86106 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Thu, 11 Mar 2021 11:02:13 +1100 Subject: [PATCH] Add png_fuzzer "smoke alarm test" --- fuzz/c/std/png_fuzzer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fuzz/c/std/png_fuzzer.c b/fuzz/c/std/png_fuzzer.c index 1191fda0..36443852 100644 --- a/fuzz/c/std/png_fuzzer.c +++ b/fuzz/c/std/png_fuzzer.c @@ -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,