Opened 10 years ago

Closed 10 years ago

#4650 closed bug (fixed)

Fix Terminal BasicTerminalBuffer::_InsertGap() to not set length longer than allocated space

Reported by: joshe Owned by: stippi
Priority: normal Milestone: R1
Component: Applications/Terminal Version: R1/alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

_InsertGap() unconditionally adds the width of the gap to the line width, even though the actual memmove() takes into account that the gap might be too large for the line buffer. Attached is a patch which insures that the line length won't be expanded beyond the size of the buffer, which is equal to the screen width.

Attachments (1)

term-line-overflow.patch (679 bytes) - added by joshe 10 years ago.
Fix possible line width overflow in BasicTerminalBuffer::_InsertGap()

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by joshe

Attachment: term-line-overflow.patch added

Fix possible line width overflow in BasicTerminalBuffer::_InsertGap()

comment:1 Changed 10 years ago by anevilyak

Component: - GeneralApplications/Terminal
Owner: changed from nobody to jackburton

comment:2 Changed 10 years ago by stippi

Owner: changed from jackburton to stippi
Status: newassigned

comment:3 Changed 10 years ago by stippi

Resolution: fixed
Status: assignedclosed

Applied in hrev33317. Nice catch!

Note: See TracTickets for help on using tickets.