summaryrefslogtreecommitdiff
path: root/alpine/mailcmd.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2020-06-13 14:13:56 -0600
committerEduardo Chappa <chappa@washington.edu>2020-06-13 14:13:56 -0600
commitd8d8e7ed38592812cc1238b87d18f46b9e83a45e (patch)
tree3c40d6b1c1a7395e89d2a34e4f0116976bfed3d7 /alpine/mailcmd.c
parent5417727912422ac3d58f3cc3fd78c75b2a060fe3 (diff)
downloadalpine-d8d8e7ed38592812cc1238b87d18f46b9e83a45e.tar.xz
* Selecting by subject might not copy the subject of the current message
to the selection text correctly. Reported by Iosif Fettich.
Diffstat (limited to 'alpine/mailcmd.c')
-rw-r--r--alpine/mailcmd.c12
1 files changed, 2 insertions, 10 deletions
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';
}