mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 16:55:11 +01:00
Add png_fuzzer "smoke alarm test"
This commit is contained in:
1 parent
f2ed33375c
commit
49c5692c32
1 file changed
+6
@@ -66,6 +66,12 @@ It should print "PASS", amongst other information, and exit(0).
|
|||||||
|
|
||||||
const char* //
|
const char* //
|
||||||
fuzz(wuffs_base__io_buffer* src, uint64_t hash) {
|
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_png__decoder dec;
|
||||||
wuffs_base__status status = wuffs_png__decoder__initialize(
|
wuffs_base__status status = wuffs_png__decoder__initialize(
|
||||||
&dec, sizeof dec, WUFFS_VERSION,
|
&dec, sizeof dec, WUFFS_VERSION,
|
||||||
|
|||||||
Reference in new issue
Block a user