Hi Ralph.

Ralph Corderoy <[email protected]> wrote:
 |Arch Linux s-nail 14.8.14-1.
 |Run `mail $USER'.
 |Type `0123456789ab\n' at the Subject prompt.

(This is a different line.)

 |Type `abcde' then Ctrl-W to word erase.
 |Type `abcd x' to suffer SEGV on the `x'.

Yes, you are right.  The NCL also had a bug in _ncl_kbwddelw(),
which drives the logic for ^W.
Thanks for reporting, i have pushed the fix below to the involved
stable/* series.

Hmm, three or four fixes which would be worth making another
v14.8.* release..., v14.8.15, then.  Then again, this bug has been introduced on
the last day of August 2013, and i expect v14.9.0 at the beginning
of February, so much improved.

Ciao!


commit fd7c813d (HEAD -> refs/heads/stable/v14.8, refs/heads/stable/stable, 
refs/heads/stable/latest)
Author:     Steffen (Daode) Nurpmeso <[email protected]>
AuthorDate: 2017-01-11 18:16:04 +0100
Commit:     Steffen (Daode) Nurpmeso <[email protected]>
CommitDate: 2017-01-11 18:16:04 +0100

    NCL: fix real cause for rare SEGV after ^W (Ralph Corderoy)
---
 tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tty.c b/tty.c
index ef5c7ead..a8546fc2 100644
--- a/tty.c
+++ b/tty.c
@@ -1164,7 +1164,7 @@ _ncl_kbwddelw(struct line *l)
    l->cursor = c;
    cap = l->line.cells + c;
 
-   if (t != l->cursor) {
+   if (l->topins != l->cursor) {
       j = t - c + i;
       memmove(cap, cap + i, j * sizeof(*cap));
    }

--steffen

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
__________________________________
[email protected]

Reply via email to