From 78cdd43ac7f0b6b14dddc0a539f50bf2609ebfa5 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Fri, 8 May 2015 09:12:03 -0600 Subject: * Crash: Pico would crash when a search and replace was requested. The problem was that the menu must have size 10, even if not all items are used, and in this case, it had size 2, making the routines that process menu items crash. * The feature Scramble the Message-ID When Sending will also scramble the name, version and operative system in the message-id header. Based on a contribution by Dennis Davis, which is itself based on a contribution by Mark Hills. --- pico/search.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pico/search.c') diff --git a/pico/search.c b/pico/search.c index 1aae21cf..5a1a1359 100644 --- a/pico/search.c +++ b/pico/search.c @@ -463,13 +463,13 @@ replace_pat(UCS *defpat, int *wrapt, int bsearch) { register int status; UCS lpat[NPAT], origpat[NPAT]; /* case sensitive pattern */ - EXTRAKEYS menu_pat[2]; + EXTRAKEYS menu_pat[10]; int repl_all = FALSE; UCS *b; char utf8tmp[NPMT]; UCS prompt[NPMT]; UCS *promptp; - int flags; + int i, flags; if(bsearch){ flags = SR_BACKWRD; @@ -486,7 +486,8 @@ replace_pat(UCS *defpat, int *wrapt, int bsearch) menu_pat[0].key = (CTRL|'X'); menu_pat[0].label = N_("Repl All"); KS_OSDATASET(&menu_pat[0], KS_NONE); - menu_pat[1].name = NULL; + for (i = 1; i < 10; i++) + menu_pat[i].name = NULL; while(1) { -- cgit v1.2.3-54-g00ecf