Check for null parameter to SkOffsetSimplePolygon

Bug: oss-fuzz:13550
Change-Id: I7ca06a44214290fe283b151f71d8f44a3ffbe225
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202707
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
Jim Van Verth 2019-03-21 13:17:43 -04:00 committed by Skia Commit-Bot
parent b804856c60
commit 87966556a1

View File

@ -1164,7 +1164,9 @@ bool SkOffsetSimplePolygon(const SkPoint* inputPolygonVerts, int inputPolygonSiz
if (SkScalarNearlyZero(offset)) {
for (int i = 0; i < inputPolygonSize; ++i) {
*offsetPolygon->push() = inputPolygonVerts[i];
*polygonIndices->push() = i;
if (polygonIndices) {
*polygonIndices->push() = i;
}
}
return true;
}