-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent invalid image array indexing
Summary: Fixed cases mainly come from the fact that ScreenWindow can be larger that TerminalDisplay's image, and the way how selection area is bounded (character's left edge, not first/last character in selection). Test Plan: * Compile with ASAN * Turn on blinking cursor * Slowly change window size to less than 1 line or less than 1 column * If everything is still ok, run `top` or anything that generates longer output Expected result: no overflows * Random selections (normal/block/line/word): * on screen in left/right direction * on screen + in history * selecting history up * selecting history down * first/last character → last/first character in the line * first/last character → last/first character on the screen * all above with wide characters Reviewers: #konsole, hindenburg Reviewed By: #konsole, hindenburg Subscribers: konsole-devel, hindenburg, #konsole Tags: #konsole Differential Revision: https://phabricator.kde.org/D12551
- Loading branch information
1 parent
7a9fd99
commit 17cb78c
Showing
2 changed files
with
36 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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