replace max_len with if statements
diff --git a/fuzz/oss_fuzz/FuzzSkDescriptorDeserialize.cpp b/fuzz/oss_fuzz/FuzzSkDescriptorDeserialize.cpp
index 9505eb7..30174bb 100644
--- a/fuzz/oss_fuzz/FuzzSkDescriptorDeserialize.cpp
+++ b/fuzz/oss_fuzz/FuzzSkDescriptorDeserialize.cpp
@@ -29,6 +29,9 @@
#if defined(IS_FUZZING_WITH_LIBFUZZER)
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+ if (size > 1024) {
+ return 0;
+ }
auto bytes = SkData::MakeWithoutCopy(data, size);
FuzzSkDescriptorDeserialize(bytes);
return 0;