imageio/*dec,Read*: add input parameter checks

Change-Id: I5e069d6ea4da9d8c71be03ef99aad679dd1aad21
This commit is contained in:
James Zern
2016-10-13 03:43:50 +00:00
parent 4eb5df28d1
commit 2a2773ea29
5 changed files with 14 additions and 3 deletions

View File

@@ -220,6 +220,8 @@ int ReadPNG(const uint8_t* const data, size_t data_size,
int64_t stride;
uint8_t* volatile rgb = NULL;
if (data == NULL || data_size == 0 || pic == NULL) return 0;
context.data = data;
context.data_size = data_size;