[net.unix-wizards] Bug in Mail

steve@miduet.mifnet.gec-mi-ate.co.uk (Steve Lademann) (05/13/86)

No doubt this is old hat, but for your edification:-

There is a bug in /usr/ucb/Mail which occurs when a system name is
rather long (as they tend to be when dealing with domain addresses in
the uk). This occurred to me when I attempted to reply (r, not R) to
mail from a local system whose fully qualified name was 30 characters.
The problem exhibits itself as a random crash (either illegal
instruction or core dump) which occurs in the routine netlook in
/usr/src/ucb/Mail/optim.c

The fix is to increase the size of the temporary buffer for the system
name nbuf[20] (line 95). I increased it to 40, as there seems to be
quite a lot of other stuff with a length of 40 chars, and why should I
be different?

"Beware the Juggernauts, my son" (Willie Rushton)
-----------------------------------------------------------------
|Steve Lademann         |Phone: 44 727 59292 x326               |
|Marconi Instruments Ltd|UUCP : ...mcvax!ukc!hrc63!miduet!steve |
|St. Albans    AL4 0JN  |NRS  : steve@uk.co.gec-mi-ate.mifnet   |
|Herts.   UK            |                                       |
---------------------------------------------------------- /\H --
|"The views expressed herein do not necessarily reflect"| /__\  |
|"those of my employer, and may not even reflect my own"| |  |  |
-----------------------------------------------------------------

bzs@BU-CS.BU.EDU (Barry Shein) (10/02/86)

Does anyone know off-hand the fix to a bug in replying to mail
which causes a repeated reply address, for example:

[this is on a SUN running 3.0 but I've seen it on our vanilla 4.2bsd VAX also]

---------------------
 [start a Mail Session]

 From homer@bu-cs.bu.edu Tue Sep 30 20:58:11 1986
 Received: by bu-cs.bu.edu (5.31/4.7)
 	id AA21517; Tue, 30 Sep 86 20:58:06 EDT
 Return-Path: <homer@bu-cs.bu.edu>
 Received: by bucse.bu.edu (5.31/4.7)
	id AA16172; Tue, 30 Sep 86 20:57:55 EDT
 Date: Tue, 30 Sep 86 20:57:55 EDT
 From: homer@bu-cs.bu.edu
 Message-Id: <8610010057.AA16172@bucse.bu.edu>
 To: ab, alpert, karenl, veress
 Subject: changes
 Status: RO

	....etc...

 & R				[note: SUN flips the sense of R and r]
 To: veress@bu-cs.bu.edu veress@bu-cs.bu.edu veress@bu-cs.bu.edu veress@bu-cs.bu.edu
     homer@bu-cs.bu.edu
 Subject: Re:  changes

--------------------

I'll try to hunt it down but I suspect someone already has, thanks in
advance if you have a fix.

	-Barry Shein, Boston University

guy@sun.UUCP (10/05/86)

> Does anyone know off-hand the fix to a bug in replying to mail
> which causes a repeated reply address, for example:
> 
> [this is on a SUN running 3.0 but I've seen it on our vanilla 4.2bsd VAX
> also]

I tend to doubt that you've seen it on a vanilla 4.2BSD VAX; you sure won't
see it on a vanilla 4.3BSD VAX - what you see there is

	To: bu-cs.bu:ab@edu bu-cs.bu:alpert@edu bu-cs.bu:karenl@edu
	    bu-cs.bu:veress@edu homer@bu-cs.bu.edu
	Subject: Re:  changes

which still isn't what you want (4.3BSD "Mail" seems still to believe in the
existence of Berknet, so it gets confused about "."  in domain names).

The bug in question is in some code in "mailx" - the Sun 3.0 "Mail" is
derived from "mailx".  "mailx" is a hacked-up version of the 4.1BSD "Mail",
with a bunch of new stuff added (one such addition caused the bug you saw);
we put all the changes between 4.1BSD "Mail" and 4.2BSD "Mail" that applied
to "mailx" into it to make the Sun 3.0 "Mail".

A bug fix to "mailx" has been posted to "net.bugs.usg".
-- 
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy@sun.com (or guy@sun.arpa)