8 Commits

Author SHA1 Message Date
Vincent Rabaud 62590dd716 [libwebp] Never send VP8_STATUS_SUSPENDED back in non-incremental.
Add the incremental_ member to the internal VP8Decoder,
to mimic VP8LDecoder

Change-Id: I34842e473bb566f51c18fe42afda63e66c0185b6
2023-09-20 11:35:55 +08:00
Masahiro Hanada 53eda93e4a [libwebp] Fix next is invalid pointer when WebPSafeMalloc fails
When WebPSafeMalloc fails on VP8LHuffmanTablesAllocate,
next is not initialized to NULL.
VP8LHuffmanTablesDeallocate uses next to know the following nodes.
A patch fixes this issue.

Change-Id: I144ae84cd97e5bca227018ef1afa95361267902c
2023-09-20 11:35:47 +08:00
roytam1 ad4ba6ecd5 [libwebp] backport missing patch from https://github.com/webmproject/libwebp/commit/067031eaed11e91d9914e1e872738c7bdf075e0b 2023-09-17 07:50:45 +08:00
Vincent Rabaud 795ad6d526 [libwebp] Fix invalid incremental decoding check.
The first condition is only necessary if we have not read enough
(enough being defined by src_last, not src_end which is the end
of the image).
The second condition now fits the comment below: "if not
incremental, and we are past the end of buffer".

BUG=oss-fuzz:62136

Change-Id: I0700f67c62db8e1c02c2e429a069a71e606a5e4f
2023-09-12 22:18:16 +08:00
Vincent Rabaud 1d0aec2ee2 [libwebp] Fix OOB write in BuildHuffmanTable.
First, BuildHuffmanTable is called to check if the data is valid.
If it is and the table is not big enough, more memory is allocated.

This will make sure that valid (but unoptimized because of unbalanced
codes) streams are still decodable.

Bug: chromium:1479274
Change-Id: I31c36dbf3aa78d35ecf38706b50464fd3d375741
2023-09-12 22:17:59 +08:00
roytam1 ba65ece578 import changes from tenfourfox:
- #501: basic support (doesn't work yet, doesn't crash) from M1294490 (630d19190)
- #501: add toggle pref (ac0300a55)
- #501: functional decoder wrapper (339688135)
- #501: libwebp 1.0.1 with endian fix to highlevel decoder (c2ce1fbd0)
- #501: convert to Demux API; add colour profile support (ceed59655)
- #501: make animated WebP failures fatal for now (ed1453647)
- #516: try to be aggressive again with global window idle timeout (f281a6bf8)
2019-02-20 15:00:50 +08:00
roytam1 4f7c67b288 import changes from rmottola/Arctic-Fox:
- Bug 1270591. Add support for checking for AVX & AVX2. Detecting AVX2 requires the use of a sub-leaf. (789319bd0)
- update libwebp to 0.6.1 (afa956138)
- fix build on intel for libwebp 0.6 (97193d7a0)
2019-02-04 12:17:43 +08:00
roytam1 b3fd37deac webp: add webp support (from waterfox-43.0.1 with modifications) 2018-06-14 01:04:57 +08:00