Commit graph

5 commits

Author SHA1 Message Date
wolfbeast
a1c22f3a76 Check for contiguous buffer state.
When we are reading large image data (i.e.: people using webp to stream
video instead of the native webm format; I'm looking at you, Giphy!)
we can run into the situation where the available data is not in a
contiguous buffer, and we need to either buffer additional data or
re-buffer from the start. If we don't do this, we can run into issues
because of buffer over-reading (causing corrupted data if allocated or
more likely crashes if not allocated).
Re-buffering is expensive, but this should be rare and limited to
dealing with unintended use for animated image formats.

This resolves #940.
2019-02-16 00:24:38 +08:00
wolfbeast
7937138cb0 Bug 1462355 - Part 1c. Make individual image decoders to use updated Decoder/SurfacePipe methods.
Extend this change to nsWebPDecoder.cpp
2019-02-16 00:20:14 +08:00
wolfbeast
dfe6efae2f Port WebP decoder changes.
This breaks animated WebP for the moment, but adds QCMS color management and lexer changes.
Tag #831
2019-02-16 00:20:09 +08:00
wolfbeast
ee622ef7cc Free the decoded image buffer before deleting the WebP decoder.
This should solve #483.
2019-02-16 00:02:45 +08:00
wolfbeast
9121db73a2 Implement WebP image decoder. 2019-02-14 14:36:33 +08:00