Revert former patch
[infodrom/newmail] / rfc2047.c
index 0c72863..4afd04a 100644 (file)
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -137,8 +137,8 @@ char *convert_header(char *buf)
 
   while ((encstart = strstr (inp, "=?"))) {
     if (encstart != inp) {
-      memcpy (outp, inp, encstart-inp);
-      outp += encstart-inp;
+      memcpy (outp, inp, encstart-inp-1);
+      outp += encstart-inp-1;
     }
     charset = encstart+2;