From edbeb8b842aa86d18388f75a1dbf1e470a565680 Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Mon, 27 Feb 2017 16:45:32 -0500 Subject: [PATCH] Fix stack-overflow in FuzzCanvas BUG=skia: Change-Id: Id42dfff7a59218a8158bf93320a64547f98a401b Reviewed-on: https://skia-review.googlesource.com/9026 Reviewed-by: Hal Canary Commit-Queue: Hal Canary --- fuzz/FuzzCanvas.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fuzz/FuzzCanvas.cpp b/fuzz/FuzzCanvas.cpp index b893fc5..a99ce96 100644 --- a/fuzz/FuzzCanvas.cpp +++ b/fuzz/FuzzCanvas.cpp @@ -272,7 +272,7 @@ sk_sp MakeFuzzShader(Fuzz* fuzz, int depth) { SkScalar pos[kMaxColors]; int colorCount; bool usePos; - fuzz->nextN(&pts, 2); + fuzz->nextN(pts, 2); fuzz->nextRange(&colorCount, 2, kMaxColors); fuzz->nextN(colors, colorCount); fuzz->next(&tmX, &useMatrix, &usePos); @@ -379,7 +379,7 @@ sk_sp MakeFuzzShader(Fuzz* fuzz, int depth) { default: break; } - return nullptr; + return nullptr; } @@ -1132,5 +1132,6 @@ static sk_sp make_picture(Fuzz* fuzz, int depth) { void FuzzCanvas(Fuzz* fuzz, SkCanvas* canvas) { fuzz_canvas(fuzz, canvas); + SkDebugf("[terminated] Finished Canvas Calls.\n"); } -- 2.7.4