D12551: Prevent invalid image array indexing

Mariusz Glebocki noreply at phabricator.kde.org
Thu Apr 26 21:52:04 UTC 2018


mglb created this revision.
mglb added a reviewer: Konsole.
mglb added a project: Konsole.
mglb requested review of this revision.

REVISION 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

REPOSITORY
  R319 Konsole

BRANCH
  wip/cursor-fixes/0001-Prevent-invalid-image-array-indexing (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D12551

AFFECTED FILES
  src/TerminalDisplay.cpp
  src/TerminalDisplay.h

To: mglb, #konsole
Cc: #konsole, herrold, ngraham, hindenburg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20180426/4c729830/attachment.html>


More information about the konsole-devel mailing list