Re: [PATCH weston] terminal: Fix segmentation fault when processing DCH ANSI escape code

2016-07-02 Thread aaron
All good points, and your previous review pointed out that terminal_shift_line is also used for ICH, though in that case I think the parameter is always positive, and so this would not apply. I think in the case of ICH it would wrap, whereas the VT docs seem to say that DCH has no effect outside t

Re: [PATCH weston] terminal: Fix segmentation fault when processing DCH ANSI escape code

2016-07-01 Thread Bryce Harrington
On Sat, Jul 02, 2016 at 12:35:21AM +, aa...@correspondwith.me wrote: > Fix a segfault where terminal parses a DCH escape code and the cursor is at > the end of the line, causing terminal_shift_line to memmove memory it doesn't > own. > --- > clients/terminal.c | 17 ++--- > 1 fil

Re: [PATCH weston] terminal: Fix segmentation fault when processing DCH ANSI escape code

2016-07-01 Thread aaron
Fix a segfault where terminal parses a DCH escape code and the cursor is at the end of the line, causing terminal_shift_line to memmove memory it doesn't own. --- clients/terminal.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/clients/terminal.c b/clients

Re: [PATCH weston] terminal: Fix segmentation fault when processing DCH ANSI escape code

2015-05-19 Thread aaron
> Since d is not used subsequently in this function, why not combine the > above two if statements into an and clause. Then the patch is just a > one-liner. It needs to short-circuit the else block, so I can't put the conditions together. > It looks like this also gets called for ICH codes, wher

Re: [PATCH weston] terminal: Fix segmentation fault when processing DCH ANSI escape code

2015-05-18 Thread Bryce Harrington
On Sun, May 17, 2015 at 07:21:24AM +, Aaron Hamilton wrote: > Fixes a segmentation fault when terminal processes a DCH ansi escape code and > the cursor is at the end of the row, and terminal_shift_line calls memmove on > memory it doesn't own. > --- It looks like this also gets called for I

[PATCH weston] terminal: Fix segmentation fault when processing DCH ANSI escape code

2015-05-17 Thread Aaron Hamilton
Fixes a segmentation fault when terminal processes a DCH ansi escape code and the cursor is at the end of the row, and terminal_shift_line calls memmove on memory it doesn't own. --- clients/terminal.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/clients