From 5d71531abec3dbd5d8f8be1590f714b40e7e4e71 Mon Sep 17 00:00:00 2001 From: Alastair Donaldson Date: Fri, 16 Jul 2021 20:34:55 +0000 Subject: [PATCH] Fix SPIR-V emptiness condition in fuzzer Fixes a problem where the fuzzer was ignoring non-empty SPIR-V binaries. Fixes: tint:1004 Change-Id: I9fa98764b7408dbd53d5b56424805e2fa331a118 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58385 Auto-Submit: Alastair Donaldson Reviewed-by: Ben Clayton Reviewed-by: Ryan Harrison Commit-Queue: Ryan Harrison Kokoro: Kokoro --- fuzzers/tint_common_fuzzer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuzzers/tint_common_fuzzer.cc b/fuzzers/tint_common_fuzzer.cc index 97bdcc7054..4c427f17a2 100644 --- a/fuzzers/tint_common_fuzzer.cc +++ b/fuzzers/tint_common_fuzzer.cc @@ -202,7 +202,7 @@ int CommonFuzzer::Run(const uint8_t* data, size_t size) { #endif // TINT_BUILD_WGSL_READER #if TINT_BUILD_SPV_READER case InputFormat::kSpv: { - if (spirv_input.empty()) { + if (!spirv_input.empty()) { program = reader::spirv::Parse(spirv_input); } break;