From 599ad097972652603836f39b414075cf625121a8 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Thu, 30 Jul 2015 22:37:14 -0600 Subject: * Pico: Searching for a string that is too long causes Pico to crash in the next search. --- pith/charconv/utf8.c | 3 ++- pith/pine.hlp | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pith/charconv/utf8.c b/pith/charconv/utf8.c index b5ce6255..7dd50fdd 100644 --- a/pith/charconv/utf8.c +++ b/pith/charconv/utf8.c @@ -2374,6 +2374,7 @@ line_paint(int offset, /* current dot offset into vl */ * is double wide. We don't want the offset to be under that > character.) */ for(w = (*width_a_to_b)(displ->vl, displ->vbase, offset); + displ->dwid > 1 && w + 2 + (displ->vbase ? 1 : 0) > displ->dwid; w = (*width_a_to_b)(displ->vl, displ->vbase, offset)){ /* @@ -2431,7 +2432,7 @@ line_paint(int offset, /* current dot offset into vl */ vlast = displ->vused-1; /* end */ w = (*width_a_to_b)(displ->vl, vfirst, vlast); - if(w + dfirst > displ->dwid){ /* off window right */ + if(displ->dwid > 0 && w + dfirst > displ->dwid){ /* off window right */ /* find last ucs character to be printed */ while(w + dfirst > displ->dwid - 1) /* -1 for > */ diff --git a/pith/pine.hlp b/pith/pine.hlp index 08b13780..f7756759 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 85 2015-07-26 23:36:26 +Alpine Commit 86 2015-07-30 22:35:13 ============= h_news ================= @@ -267,6 +267,9 @@ Bugs that have been addressed include:
  • SMIME: Cancelling entering password to unlock key will not reprompt. +
  • Pico: Searching for a string that is too long causes Pico to crash + in the next search. +
  • Fix vulnerability in regex library. This only affects those who use this library, such as the windows version of Alpine. See http://www.kb.cert.org/vuls/id/695940 -- cgit v1.2.3-54-g00ecf