Fix ArrayIndexOutOfBoundsException in TreeItem.getBounds() on Cocoa - #3628
Open
ravnskjaer wants to merge 1 commit into
Open
ravnskjaer wants to merge 1 commit into
ravnskjaer wants to merge 1 commit into
Conversation
getBounds() indexed cellFont with the physical NSOutlineView column, which shifts by 1 when SWT.CHECK adds a checkColumn. cellFont is sized by logical column count, causing an out-of-bounds read. getBounds() only reports the item's primary text, so read cellFont[0] unconditionally, matching existing methods getImageBounds(int)/getTextBounds(int)/redraw(int). Fixes eclipse-platform#2749 A follow-up in eclipse.platform is needed to remove the now-unnecessary try/catch workaround in BreakpointLabelAction.computeInlineEditorBounds().
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.
getBounds() indexed cellFont with the physical NSOutlineView column, which shifts by 1 when SWT.CHECK adds a checkColumn. cellFont is sized by logical column count, causing an out-of-bounds read. getBounds() only reports the item's primary text, so read cellFont[0] unconditionally, matching existing methods
getImageBounds(int)/getTextBounds(int)/redraw(int).
Fixes #2749
A follow-up in eclipse.platform is needed to remove the now-unnecessary try/catch workaround in
BreakpointLabelAction.computeInlineEditorBounds().