Pascal Massimino
ae568ce7c4
ImgIoUtilReadFile: fix file leak upon error
...
the file was not closed in case of malloc error.
Change-Id: I5f8b22d7d0da6d2c8c2dd245cdd57994e3ddea3a
2017-11-29 21:30:22 +01:00
James Zern
08ea9ecde3
imageio: add ability restrict max image size
...
WEBP_MAX_IMAGE_SIZE can be defined to control this limit.
Set it to 1.5GiB w/--config=asan-fuzzer to avoid OOM with large resolution
images. This limit leaves some headroom over the single image max of 2^14 *
2^14 * 4
BUG=webp:355
Change-Id: I4d48eb0a063638297a842582e0229dfd5a54df5f
2017-08-08 07:02:02 -07:00
Pascal Massimino
699b04161a
ImgIoUtilWriteFile(): use ImgIoUtilSetBinaryMode
...
this matches what's done in cwebp.c:977
Change-Id: I0a05d03c97a073b8aa1e01430f20d6cc3c5ffc91
2017-02-26 14:05:42 -08:00
James Zern
bc86b7a8a1
imageio_util: add ImgIoUtilCheckSizeArgumentsOverflow
...
and use it to validate decoder allocations. fixes a crash in jpegdec at
least.
BUG=webp:312
Change-Id: Ia940590098f29510add6aad10a8dfe9e9ea46bf4
2016-10-07 14:41:48 -07:00
James Zern
da573cf490
imageio_util: s/ExUtil/ImgIoUtil/
...
ExUtil(SetBinaryMode|ReadFile|ReadFromStdin|WriteFile|CopyPlane) ->
ImgIoUtil(SetBinaryMode|ReadFile|ReadFromStdin|WriteFile|CopyPlane)
Change-Id: I5497f8fe514347efeb83b8b8866ef334390fc18e
2016-07-21 20:40:11 -07:00
James Zern
bdda5bd4bf
split example_util.h
...
move ExUtil*File to imageio_util.h
ExUtil*WebP* to webpdec.h
string parsing routines remain
Change-Id: I0560c4a74e86710d83bc4b5b234f1b5ef9a86f9d
2016-07-21 19:14:58 -07:00