Flutter Engine
The Flutter Engine
Functions | Variables
InvalidIndexedPngTest.cpp File Reference
#include "include/core/SkBitmap.h"
#include "tests/CodecPriv.h"
#include "tests/Test.h"

Go to the source code of this file.

Functions

 DEF_TEST (InvalidIndexedPng, reporter)
 

Variables

unsigned char gPngData []
 

Function Documentation

◆ DEF_TEST()

DEF_TEST ( InvalidIndexedPng  ,
reporter   
)

Definition at line 30 of file InvalidIndexedPngTest.cpp.

30 {
32 // Make our PNG invalid by changing a byte.
33 gPngData[sizeof(gPngData) - 1] = 1;
34
36}
bool decode_memory(const void *mem, size_t size, SkBitmap *bm)
Definition: CodecPriv.h:21
unsigned char gPngData[]
sk_sp< const SkImage > image
Definition: SkRecords.h:269

Variable Documentation

◆ gPngData

unsigned char gPngData[]
Initial value:
= {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x08, 0x03, 0x00, 0x00, 0x00, 0x28, 0xcb, 0x34, 0xbb, 0x00, 0x00, 0x00,
0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
0x1c, 0x00, 0x0f, 0x01, 0xb9, 0x8f, 0x00, 0x00, 0x00, 0x06, 0x50, 0x4c,
0x54, 0x45, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0xd2, 0x87, 0xef, 0x71,
0x00, 0x00, 0x00, 0x13, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0xed, 0xfd,
0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xf8, 0xaf, 0x16, 0x46, 0x00,
0x02, 0x00, 0x01, 0x32, 0x60, 0xf7, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x49,
0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
}

Definition at line 13 of file InvalidIndexedPngTest.cpp.