bugfix: Add favicon max allowed size to handle unreasonably large favicons.#7710
Merged
bugfix: Add favicon max allowed size to handle unreasonably large favicons.#7710
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
CDRussell
approved these changes
Feb 10, 2026
Member
CDRussell
left a comment
There was a problem hiding this comment.
Working great, can confirm crash before and now working fine. Great work!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Task/Issue URL: https://app.asana.com/1/137249556945/task/1212341818869426
Description
Handle unreasonably large favicons gracefully, by setting a max size in pixels.
Steps to test this PR
cd /tmp/favicon_test && python3 -m http.server 8888 (The test page serves a 6708×6708 PNG as its touch icon)
RuntimeException: Canvas: trying to draw too large(179989056bytes) bitmapBut with the changes shouldn't crash.Note
Low Risk
Small, localized change that only constrains favicon bitmap dimensions; low risk aside from potential quality reduction for very large icons.
Overview
Prevents crashes from unreasonably large favicons by introducing a
MAX_FAVICON_SIZE_PXcap (512px) and enforcing it across Glide favicon fetches.Both async (
CustomTarget) and sync (submit) download paths for disk and URL loads now request bitmaps at the capped size, limiting memory usage during decoding/rendering.Written by Cursor Bugbot for commit 91ca909. This will update automatically on new commits. Configure here.