Fix stack-overflow in FuzzCanvas
BUG=skia: Change-Id: Id42dfff7a59218a8158bf93320a64547f98a401b Reviewed-on: https://skia-review.googlesource.com/9026 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
This commit is contained in:
parent
7ce0a459d9
commit
edbeb8b842
@ -272,7 +272,7 @@ sk_sp<SkShader> 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<SkShader> MakeFuzzShader(Fuzz* fuzz, int depth) {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return nullptr;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -1132,5 +1132,6 @@ static sk_sp<SkPicture> make_picture(Fuzz* fuzz, int depth) {
|
||||
|
||||
void FuzzCanvas(Fuzz* fuzz, SkCanvas* canvas) {
|
||||
fuzz_canvas(fuzz, canvas);
|
||||
SkDebugf("[terminated] Finished Canvas Calls.\n");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user