Implement gif.decoder.workbuf_len

Also relax decode_frame's workbuf length check from not-equals to
less-than.
This commit is contained in:
Nigel Tao committed 2018-11-17 21:52:26 +11:00
1 parent 4023294ba2
commit fc1002cb89
5 files changed
+34 -61

No files matched your search

+1 -1
View File
@@ -73,7 +73,7 @@ const char* fuzz(wuffs_base__io_reader src_reader, uint32_t hash) {
goto exit;
}
uint64_t n = wuffs_base__image_config__workbuf_len(&ic).max_incl;
uint64_t n = wuffs_gif__decoder__workbuf_len(&dec).max_incl;
if (n > 64 * 1024 * 1024) { // Don't allocate more than 64 MiB.
ret = "image too large";
goto exit;