From 940b52d33995e0af13edf48d5ee6647b7e8b4a17 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Fri, 23 Oct 2015 07:52:47 -0600 Subject: * Crash in Pico when forwarding messages that contain a direction mark at the end of a line. Reported by James Mingo. --- pico/pico.c | 10 ++++++---- pith/pine.hlp | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pico/pico.c b/pico/pico.c index d93798c4..93d555d4 100644 --- a/pico/pico.c +++ b/pico/pico.c @@ -107,17 +107,19 @@ void remove_directions_mark(void) { LINE *lp; - int i, ll; + int i; UCS c; for(lp = lforw(curbp->b_linep); lp != curbp->b_linep; lp = lforw(lp)){ - ll = llength(lp); - for(i = 0; i < ll;){ + for(i = 0; i < llength(lp);){ c = lgetc(lp, i).c; if(c == 0x200E || c == 0x200F){ curwp->w_dotp = lp; curwp->w_doto = i; - forwdel(FALSE, 1); + if(i < llength(lp)) + forwdel(FALSE, 1); + else + llength(lp)--; direction = c == 0x200E ? 0 : 1; } else diff --git a/pith/pine.hlp b/pith/pine.hlp index fb087142..986c0ae8 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -344,6 +344,9 @@ Bugs that have been addressed include: Ulf-Dietrich Braumann.
  • Crash when reviewing history of saving attachments. + +
  • Crash in Pico when forwarding messages that contain a direction mark + at the end of a line. Reported by James Mingo. -- cgit v1.2.3-54-g00ecf