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

@@ -276,6 +276,8 @@ int ReadPictureWithWIC(const char* const filename,
int has_alpha = 0;
int64_t stride;
if (filename == NULL || pic == NULL) return 0;
IFS(CoInitialize(NULL));
IFS(CoCreateInstance(MAKE_REFGUID(CLSID_WICImagingFactory), NULL,
CLSCTX_INPROC_SERVER,