Fuzz skpicture with ReadBuffer
Bug: skia: Change-Id: Id581895b5248a8f24eed77cad20fc751257c2c95 Reviewed-on: https://skia-review.googlesource.com/83861 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
parent
d21b2a5d5c
commit
09757b29fe
@ -440,9 +440,9 @@ static void fuzz_img(sk_sp<SkData> bytes, uint8_t scale, uint8_t mode) {
|
||||
}
|
||||
|
||||
static void fuzz_skp(sk_sp<SkData> bytes) {
|
||||
SkMemoryStream stream(bytes);
|
||||
SkReadBuffer buf(bytes->data(), bytes->size());
|
||||
SkDebugf("Decoding\n");
|
||||
sk_sp<SkPicture> pic(SkPicture::MakeFromStream(&stream));
|
||||
sk_sp<SkPicture> pic(SkPicture::MakeFromBuffer(buf));
|
||||
if (!pic) {
|
||||
SkDebugf("[terminated] Couldn't decode as a picture.\n");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user