gecko-dev/image/decoders
Timothy Nikkel 21823adb7d Bug 1885209. Sanity check pixel format of internal icon type images. r=gfx-reviewers,nical
The page has

  <link rel="shortcut icon" type="image/x-icon" href="data:image/icon;base64,__png_data__">

When the Favicon service tries to decode that is passes "image/icon" as the mimetype to choose the decoder type and so we try to decode it as our internal icon format (not a format used in the wild, only used internal to get pass around icon data we retrieved from the OS). This passes in an invalid format type and hits the assert. In a non-debug build we fail to create the surface pipe later when we can't find a swizzle function. We only ever create these icon files with formats R8G8B8A8, OS_RGBA, or B8G8R8A8. The favicon still gets displayed so the favicon service must be trying something more complicated if that fails.

In the normal content image loading path we prefer to sniff the content type from the image data and if that fails fall back to the specified content type. So the test had be careful not to look like png (or any other) image format so that we actually tried to decode it as an icon.

Differential Revision: https://phabricator.services.mozilla.com/D204732
2024-05-21 00:41:56 +00:00
..
icon Bug 1885209. Sanity check pixel format of internal icon type images. r=gfx-reviewers,nical 2024-05-21 00:41:56 +00:00
EXIF.cpp
EXIF.h
GIF2.h
iccjpeg.c
iccjpeg.h
metrics.yaml Bug 1877840 - Migrate GVST metrics in the avif namespace to pure glean r=chutten,tnikkel 2024-02-09 19:47:46 +00:00
moz.build
nsAVIFDecoder.cpp Bug 1877840 - Migrate GVST metrics in the avif namespace to pure glean r=chutten,tnikkel 2024-02-09 19:47:46 +00:00
nsAVIFDecoder.h Bug 1869332 - Move libaom to libgkcodecs. r=glandium,media-playback-reviewers,chunmin 2023-12-20 02:32:34 +00:00
nsBMPDecoder.cpp Bug 1872536 - Use MakeUniqueFallible for large buffers in image decoders/encoders. r=gfx-reviewers,lsalzman 2023-12-31 22:16:46 +00:00
nsBMPDecoder.h
nsGIFDecoder2.cpp Bug 1835509. If we encounter a bad LZW block in a gif frame still report success if we have decoded frames before this successfully. r=aosmond 2024-03-01 11:42:43 +00:00
nsGIFDecoder2.h
nsICODecoder.cpp Bug 1872536 - Use MakeUniqueFallible for large buffers in image decoders/encoders. r=gfx-reviewers,lsalzman 2023-12-31 22:16:46 +00:00
nsICODecoder.h
nsIconDecoder.cpp Bug 1885209. Sanity check pixel format of internal icon type images. r=gfx-reviewers,nical 2024-05-21 00:41:56 +00:00
nsIconDecoder.h Bug 1885209. Sanity check pixel format of internal icon type images. r=gfx-reviewers,nical 2024-05-21 00:41:56 +00:00
nsJPEGDecoder.cpp
nsJPEGDecoder.h
nsJXLDecoder.cpp
nsJXLDecoder.h
nsPNGDecoder.cpp Bug 1873422. Ignore "invalid chunk type" errors in pngs if we have enough data to display something when encountered. r=aosmond 2024-02-24 01:00:10 +00:00
nsPNGDecoder.h Bug 1873422. Ignore "invalid chunk type" errors in pngs if we have enough data to display something when encountered. r=aosmond 2024-02-24 01:00:10 +00:00
nsWebPDecoder.cpp Bug 1890090. Check return value of WebPInitDecBuffer in webp decoder. r=gfx-reviewers,lsalzman 2024-04-06 04:27:37 +00:00
nsWebPDecoder.h