From percy.rain.com!intelhf!aahz!batie Tue Mar 12 23:17:28 1991
Return-Path: <intelhf!aahz!batie@percy.rain.com>
Received: by percival.rain.com (/\=-/\ Smail3.1.18.1 #18.2)
	id <m0jGQ5P-000At3C@percival.rain.com>; Tue, 12 Mar 91 23:17 PST
Received: by percy.rain.com (/\==/\ Smail3.1.20.1 #20.2)
	id <m0jGPxF-0004qzC@percy.rain.com>; Tue, 12 Mar 91 23:09 PST
Received: by intelhf.hf.intel.com (/\=-/\ Smail3.1.17.5 #17.19); Tue, 12 Mar 91 15:04 PST
Received: by aahz.hf.intel.com (/\==/\ Smail3.1.20.1 #20.1); Tue, 12 Mar 91 15:00 PST
Message-Id: <m0jGIKa-0001WVC@aahz.hf.intel.com>
From: batie@aahz.hf.intel.com (Alan Batie)
Subject: Patch to smail 3.1.20
To: neighorn@qiclab.scn.rain.com, nerd@percival.rain.com, randy@m2xenix.psg.com,
	tod@parsely.rain.com
Date: Tue, 12 Mar 91 15:00:36 PST
X-Mailer: ELM [version 2.3 PL11]
Status: OR

This is a little patch that I would've thought they'd have figured out
by now, but since they didn't, I've sent it in.  It fixes a core dump
problem when receiving SMTP mail on 3.2 (the free routine on R4 doesn't
seem to clobber the pointer, but then I think I forgot to tell it to use
-lmalloc too):

*** smtprecv.c	Sat Feb 23 01:20:53 1991
--- ../../smail31.17/src/smtprecv.c	Wed Mar  7 18:34:48 1990
***************
*** 435,448 ****
  reset_state()
  {
      struct addr *cur;
  
!     for (cur = recipients; cur; cur = cur->succ) {
  	xfree(cur->in_addr);
  	if (cur->work_addr) {
  	    /* work_addr is defined only for interactive smtp */
  	    xfree(cur->work_addr);
  	}
  	xfree((char *)cur);
      }
      recipients = NULL;
  
--- 435,452 ----
  reset_state()
  {
      struct addr *cur;
+     struct addr *tmp;
  
!     cur = recipients;
!     while (cur) {
  	xfree(cur->in_addr);
  	if (cur->work_addr) {
  	    /* work_addr is defined only for interactive smtp */
  	    xfree(cur->work_addr);
  	}
+ 	tmp = cur->succ;
  	xfree((char *)cur);
+ 	cur = tmp;
      }
      recipients = NULL;
  
-- 
Alan Batie                      \           Someday I would like to stand
                                 \          on the moon, look through a
batie@aahz.hf.intel.com          /\         quarter of a million miles of
uunet!intelhf!aahz!batie        /  \        space, and say, "There certainly
+1 503-696-4101                /    \       is a beautiful Earth out tonight".

