Repository navigation
REGRESSION(308123@main): [GTK] Crash in Clipboard::formats() when pasting with an empty clipboard - #77266
Open
asxpi wants to merge 1 commit into
Conversation
Collaborator
|
EWS run on previous version of this PR (hash e6b5e9f) Details |
csaavedra
reviewed
Oct 16, 2026
…ting with an empty clipboard https://bugs.webkit.org/show_bug.cgi?id=324466 Reviewed by NOBODY (OOPS!). When the targets cannot be retrieved, for example when the clipboard has no owner, GTK 3 calls the targets callback with atoms == nullptr and n_atoms == -1. The loop over the atoms ran zero times for that until 308123@main turned it into a span, which takes -1 as a huge size over a null pointer: the UI process crashed on every paste of an empty clipboard. Clamp the count to zero, as readBuffer() already does for its length. * Source/WebKit/UIProcess/gtk/ClipboardGtk3.cpp: (WebKit::Clipboard::formats):
asxpi
force-pushed
the
eng/REGRESSION-308123-main-GTK-Crash-in-Clipboard-formats-when-pasting-with-an-empty-clipboard
branch
from
October 16, 2026 12:30
e6b5e9f to
9cdf4a1
Compare
Collaborator
|
EWS run on current version of this PR (hash 9cdf4a1) Details |
Author
Thanks, done! The loop is unchanged now and the count is clamped with std::max(0, atomsCount), like readBuffer() does |
csaavedra
approved these changes
Oct 16, 2026
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.
🛠 ios-safer-cpp
9cdf4a1
9cdf4a1
🛠 playstation