From d8d8e7ed38592812cc1238b87d18f46b9e83a45e Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sat, 13 Jun 2020 14:13:56 -0600 Subject: * Selecting by subject might not copy the subject of the current message to the selection text correctly. Reported by Iosif Fettich. --- alpine/mailcmd.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'alpine/mailcmd.c') diff --git a/alpine/mailcmd.c b/alpine/mailcmd.c index 794e335a..e26495ed 100644 --- a/alpine/mailcmd.c +++ b/alpine/mailcmd.c @@ -8250,7 +8250,7 @@ select_by_text(MAILSTREAM *stream, MSGNO_S *msgmap, long int msgno, SEARCHSET ** { int r, ku, type, we_cancel = 0, flags, rv, ekeyi = 0; int not = 0, me = 0; - char sstring[80], savedsstring[80], tmp[128]; + char sstring[80], tmp[128]; char *p, *sval = NULL; char buftmp[MAILTMPLEN], namehdr[80]; ESCKEY_S ekey[8]; @@ -8264,7 +8264,6 @@ select_by_text(MAILSTREAM *stream, MSGNO_S *msgmap, long int msgno, SEARCHSET ** static char *dont_match_me = N_("[Don't_Match_My_Addresses]"); ps_global->mangled_footer = 1; - savedsstring[0] = '\0'; ekey[0].ch = ekey[1].ch = ekey[2].ch = ekey[3].ch = -1; while(1){ @@ -8497,15 +8496,8 @@ select_by_text(MAILSTREAM *stream, MSGNO_S *msgmap, long int msgno, SEARCHSET ** if(env && env->subject && env->subject[0]){ char *q = NULL; - snprintf(buftmp, sizeof(buftmp), "%.75s", env->subject); - buftmp[sizeof(buftmp)-1] = '\0'; q = (char *) rfc1522_decode_to_utf8((unsigned char *)tmp_20k_buf, - SIZEOF_20KBUF, buftmp); - if(q != env->subject){ - snprintf(savedsstring, sizeof(savedsstring), "%.70s", q); - savedsstring[sizeof(savedsstring)-1] = '\0'; - } - + SIZEOF_20KBUF, env->subject); snprintf(sstring, sizeof(sstring), "%s", q); sstring[sizeof(sstring)-1] = '\0'; } -- cgit v1.2.3-54-g00ecf