require finite blob bounds
inspired by https://fuzzer.skia.org/category/image_filter_deserialize/file/aW5jbHVkZS9jb3JlL1NrUGFpbnQuaA==? Bug: skia: Change-Id: I490585b9fdc0b4b29565849478b97ed7f5057ca1 Reviewed-on: https://skia-review.googlesource.com/98800 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
parent
01b476a028
commit
74d6e113a5
@ -50,6 +50,7 @@
|
||||
#include "SkVertices.h"
|
||||
|
||||
#define RETURN_ON_NULL(ptr) do { if (nullptr == (ptr)) return; } while (0)
|
||||
#define RETURN_ON_FALSE(pred) do { if (!(pred)) return; } while (0)
|
||||
|
||||
class SkNoPixelsDevice : public SkBaseDevice {
|
||||
public:
|
||||
@ -2610,6 +2611,7 @@ void SkCanvas::drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
|
||||
const SkPaint& paint) {
|
||||
TRACE_EVENT0("skia", TRACE_FUNC);
|
||||
RETURN_ON_NULL(blob);
|
||||
RETURN_ON_FALSE(blob->bounds().makeOffset(x, y).isFinite());
|
||||
this->onDrawTextBlob(blob, x, y, paint);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user