"mailx" screws up "reply" addresses in some cases

Daniel R. Levy levy at ttrdc.UUCP
Wed Oct 8 03:32:26 AEST 1986


In article <7926 at sun.uucp>, guy at sun.UUCP writes:
>The fix, to "optim.c", is:
>
>------- optim.c -------
>*** /tmp/da0248	Sun Oct  5 13:36:02 1986
>--- optim.c	Sat Oct  4 02:04:18 1986
>***************
>*** 239,245 ****
>  	char from[];
>  {
>  	register char *cp;
>! 	static char rbuf[200];
>  
>  	if (debug) fprintf(stderr, "makeremote(%s, %s) returns ", name, from);
		  ^(void)

>  	strcpy(rbuf, name);
       ^(void)

>--- 239,245 ----
>  	char from[];
>  {
>  	register char *cp;
>! 	char rbuf[BUFSIZ];
>  
>  	if (debug) fprintf(stderr, "makeremote(%s, %s) returns ", name, from);
>  	strcpy(rbuf, name);
>***************
>*** 248,254 ****
>  		cp = rindex(from, '%');
>  	strcat(rbuf, cp);
       ^(void)

>  	if (debug) fprintf(stderr, "%s\n", rbuf);
                  ^(void)
>! 	return rbuf;
>  }
>  
>  /*
>--- 248,254 ----
>  		cp = rindex(from, '%');
>  	strcat(rbuf, cp);
>  	if (debug) fprintf(stderr, "%s\n", rbuf);
>! 	return(savestr(rbuf));
>  }
>  
>  /*
>which allocates a new string buffer for each recipient and returns a point
>to it instead of a pointer to the local buffer.  Since the local buffer is
>now purely temporary, it is made automatic.
>	Guy Harris

Hey, while you're making fixes to the "functionality" (love that non-word...)
why not make lint fixes too?
-- 
 -------------------------------    Disclaimer:  The views contained herein are
|       dan levy | yvel nad      |  my own and are not at all those of my em-
|         an engihacker @        |  ployer or the administrator of any computer
| at&t computer systems division |  upon which I may hack.
|        skokie, illinois        |
 --------------------------------   Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa,
	   go for it!  			allegra,ulysses,vax135}!ttrdc!levy



More information about the Net.bugs.usg mailing list