head	1.1;
access;
symbols
	TIGRIS_1_0_8_1:1.1
	TIGRIS_1_0_8_0:1.1
	TIGRIS_1_0_4:1.1;
locks; strict;
comment	@# @;


1.1
date	2001.03.30.04.19.24;	author edk;	state Exp;
branches;
next	;


desc
@@


1.1
log
@this patch fixes bugs in ezmlm related to incorrect assumptions it made
regarding the order of evaluation of the arguments to a function (which
is not defined in ansi c).
@
text
@--- ezmlm-cgi.c.orig	Thu Mar 29 19:55:44 2001
+++ ezmlm-cgi.c	Thu Mar 29 20:16:35 2001
@@@@ -1471,8 +1471,10 @@@@
 	      oputs("\">");
 	    }
 	    if (flagobscure && i == HDR_FROM - 1) {
+	      int k;
 	      oputs(" ");
-	      decodeHDR(cp,author_name(&cp,line.s,line.len),&decline,"",FATAL);
+	      k = author_name(&cp,line.s,line.len);
+	      decodeHDR(cp,k,&decline,"",FATAL);
 	      html_put(decline.s,decline.len);
 	    } else {
 	      decodeHDR(hdr[i].s,hdr[i].len,&decline,"",FATAL);
--- ezmlm-send.c.orig	Thu Mar 29 19:47:31 2001
+++ ezmlm-send.c	Thu Mar 29 19:54:00 2001
@@@@ -231,6 +231,7 @@@@
   int match;
   int r;
   unsigned int pos;
+  int k;
 
   if (!stralloc_copys(&fnadir,"archive/")) die_nomem();
   if (!stralloc_catb(&fnadir,strnum,fmt_ulong(strnum,outnum / 100)))
@@@@ -308,7 +309,9 @@@@
   if (!stralloc_catb(&qline,hash,HASHLEN)) die_nomem();
   if (!stralloc_cats(&qline," ")) die_nomem();
 
-  decodeHDR(cp,author_name(&cp,lines.s,lines.len),&from,charset.s,FATAL);
+  k = author_name(&cp,lines.s,lines.len);
+  decodeHDR(cp,k,&from,charset.s,FATAL);
+
   (void) unfoldHDR(from.s,from.len,&lines,charset.s,&dcprefix,0,FATAL);
   if (!stralloc_cat(&qline,&lines)) die_nomem();
 
--- ezmlm-idx.c.orig	Thu Mar 29 19:55:38 2001
+++ ezmlm-idx.c	Thu Mar 29 19:56:26 2001
@@@@ -282,6 +282,8 @@@@
     } else if (fstat(fd,&st) == -1 || (!(st.st_mode & 0100)))
         close(fd);
     else {
+      int k;
+
       subject.len = 0;		/* clear in case they're missing in msg */
       author.len = 0;
       received.len = 0;
@@@@ -303,7 +305,9 @@@@
       mkauthhash(lines.s,lines.len,hash);
       if (!stralloc_catb(&line,hash,HASHLEN)) die_nomem();
 
-      decodeHDR(cp,author_name(&cp,lines.s,lines.len),&author,charset.s,FATAL);
+      k = author_name(&cp,lines.s,lines.len);
+      decodeHDR(cp,k,&author,charset.s,FATAL);
+
       (void) unfoldHDR(author.s,author.len,&lines,charset.s,&prefix,0,FATAL);
 
       if (!stralloc_cats(&line," ")) die_nomem();
@
