Opened 15 years ago

Closed 15 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:
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 15 years ago.
Fix possible line width overflow in BasicTerminalBuffer::_InsertGap()

Download all attachments as: .zip

Change History (4)

by joshe, 15 years ago

Attachment: term-line-overflow.patch added

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

comment:1 by anevilyak, 15 years ago

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

comment:2 by stippi, 15 years ago

Owner: changed from jackburton to stippi
Status: newassigned

comment:3 by stippi, 15 years ago

Resolution: fixed
Status: assignedclosed

Applied in hrev33317. Nice catch!

Note: See TracTickets for help on using tickets.