From fbc06d831fac07667a45bd0655461c028065a7ad Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Mon, 26 Apr 2021 10:53:08 -0400 Subject: [PATCH] Switch runtime effect fuzzer to use MakeForShader New entry point that does stricter checking on SkSL validity. Bug: skia:11813 Change-Id: Icc8501c108af278e2fe1029859a552ea6ab6eb08 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401056 Reviewed-by: Kevin Lubick Commit-Queue: Brian Osman --- fuzz/oss_fuzz/FuzzSkRuntimeEffect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuzz/oss_fuzz/FuzzSkRuntimeEffect.cpp b/fuzz/oss_fuzz/FuzzSkRuntimeEffect.cpp index 25bd0a78c8..dec5c4a834 100644 --- a/fuzz/oss_fuzz/FuzzSkRuntimeEffect.cpp +++ b/fuzz/oss_fuzz/FuzzSkRuntimeEffect.cpp @@ -36,7 +36,7 @@ static bool FuzzSkRuntimeEffect_Once(sk_sp bytes, const SkRuntimeEffect: sk_sp codeBytes = SkData::MakeSubset(bytes.get(), 0, bytes->size() - kReservedBytes); SkString shaderText{static_cast(codeBytes->data()), codeBytes->size()}; - SkRuntimeEffect::Result result = SkRuntimeEffect::Make(shaderText, options); + SkRuntimeEffect::Result result = SkRuntimeEffect::MakeForShader(shaderText, options); SkRuntimeEffect* effect = result.effect.get(); if (!effect || effect->uniformSize() > kReservedBytes) { // if there is not enough uniform bytes