Hypermail and some MIME headers

From: Martin Schulze <joey_at_finlandia.Infodrom.North.DE_at_hypermail-project.org>
Date: Wed, 21 Apr 1999 10:05:30 +0200
Message-ID: <19990421100530.A14994_at_finlandia.infodrom.north.de>


Hi Daniel, Hi others,

I have experienced a bug that causes hypermail to lose messages. One of my friends has found some time to work on it and found the bug. Thus I'm now sending the patch back upstream. Please apply it.

First comes a fix to make it compile with glibc 2.1 where strcpy() is defined as macro. Since it is defined in some .h file which is included there is no need to prototype it manually.

Index: archive/msg2archive.c



RCS file: /home/archive/debian/hypermail/archive/msg2archive.c,v retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- archive/msg2archive.c	1999/02/16 10:27:52	1.2
+++ archive/msg2archive.c	1999/04/21 07:59:45	1.3

_at_@ -44,7 +44,6 @@

 FILE *hypfp;  

 char *strrchr();
-char *strcpy(); /* libc.a function declaration */  int pclose();
 int getopt();
 long time();

Index: debian/changelog



RCS file: /home/archive/debian/hypermail/debian/changelog,v retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- debian/changelog	1999/02/16 10:27:52	1.15
+++ debian/changelog	1999/04/21 07:59:45	1.16

_at_@ -1,3 +1,11 @@
+hypermail (2.0b3-5) unstable; urgency=low, closes=36274 34905 33365
+
+  * Removed reference to function strcpy() which is a macro now, glibc2.1 fix
+  * Applied patch from Andreas Fuchs <asf_at_ycom.at> which fixes a bug with
+    attachements (closes: Bug#36274, 33365)
+
+ -- Martin Schulze <joey_at_finlandia.infodrom.north.de>  Wed, 21 Apr 1999 09:56:22 +0200
+

 hypermail (2.0b3-4) unstable; urgency=low, closes=32567  

Here is the patch for the MIME problem. Please find a longer explanation at http://www.Infodrom.North.DE/Debian/Bugs/db/36/36274.html and http://www.Infodrom.North.DE/Debian/Bugs/db/33/33365.html

Both will be cleared in one month.

Index: src/parse.c



RCS file: /home/archive/debian/hypermail/src/parse.c,v retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- src/parse.c	1999/02/16 10:27:52	1.3
+++ src/parse.c	1999/04/21 07:59:45	1.4

_at_@ -1071,7 +1071,7 @@
 
                     if (!strncasecmp( head->line, "Content-Type:", 13)) {
                        char *ptr=head->line+13;
-                       char *boundary;
+                       char *boundary = NULL;
                        char type[129];

 #define DISP_HREF 1
 #define DISP_IMG 2
_at_@ -1118,6 +1118,8 @@
                            disposition = DISP_IGNORE;
                          }
                        }
+		       if (boundary == NULL)
+			 boundary=strcasestr(ptr, "boundary=");
                        if((DISP_IGNORE==disposition) || ignorecontent(type)) {
                          /* don't save this */
                          disposition = DISP_IGNORE;

_at_@ -1298,8 +1300,6 @@
** Find the first boundary separator */ - boundary=strcasestr(ptr, "boundary="); - if (boundary) { boundary=(char *)strchr(boundary, '='); if (boundary) {
_at_@ -1310,7 +1310,7 @@
sscanf(++boundary, "%[^\"]", boundbuffer); } else - sscanf(boundary, "%s", boundbuffer); + sscanf(boundary, "%[^;]", boundbuffer); boundary = boundbuffer; }

Regards,

        Joey

-- 
A mathematician is a machine for converting coffee into theorems.

Please always Cc to me when replying to me on the lists.
Received on Wed 21 Apr 1999 07:13:08 PM GMT

This archive was generated by hypermail 2.3.0 : Sat 13 Mar 2010 03:46:11 AM GMT GMT