bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-mailutils] Vacation action bug...


From: Sergey Poznyakoff
Subject: Re: [bug-mailutils] Vacation action bug...
Date: Tue, 26 Jul 2005 01:57:34 +0300

Kostas Zorbadelos <address@hidden> wrote:

> The vacation action in sieve corrupts the subject of messages.
> Please find attached an example mail produced by sieve
> vacation. Notice the subject header.

I installed the following patch:

Index: mailbox/rfc2047.c
===================================================================
RCS file: /cvsroot/mailutils/mailutils/mailbox/rfc2047.c,v
retrieving revision 1.23
diff -p -u -r1.23 rfc2047.c
--- mailbox/rfc2047.c   24 May 2005 14:12:38 -0000      1.23
+++ mailbox/rfc2047.c   25 Jul 2005 22:50:25 -0000
@@ -264,13 +264,16 @@ rfc2047_encode (const char *charset, con
       *result = malloc (2 + strlen (charset) + 3 + strlen (text) * 3 + 3);
       if (*result)
        {
-         sprintf (*result, "=?%s?%s?", charset, encoding);
+         char *p = *result;
+         size_t s;
+         
+         p += sprintf (p, "=?%s?%s?", charset, encoding);
          
          rc = stream_sequential_read (output_stream,
-                                      *result + strlen (*result),
-                                      strlen (text) * 3, NULL);
+                                      p,
+                                      strlen (text) * 3, &s);
 
-         strcat (*result, "?=");
+         strcpy (p + s, "?=");
        }
       else
        rc = ENOMEM;

Regards,
Sergey
        




reply via email to

[Prev in Thread] Current Thread [Next in Thread]