Bug 16485 - Problem with latest upgrade to mailx: core dump
Problem with latest upgrade to mailx: core dump
Product: Red Hat Linux
Classification: Retired
Component: mailx (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Florian La Roche
: 17461 17535 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2000-08-17 19:28 EDT by Rick San Soucie
Modified: 2008-05-01 11:37 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-11-02 09:12:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Rick San Soucie 2000-08-17 19:28:43 EDT
I have RH 6.2 installed.  Using the upgrade agent, I upgraded 
my  mailx-8.1.1-10.i386.rpm to  mailx-8.1.1-16.i386.rpm.

After the upgrade, whenever I run mail, open a message to view, and then exit mail, I
get a segmentation fault and core dump.

See the support incident #154690.

I have uninstalled mailx-8.1.1-16.i386.rpm, and restored mailx-8.1.1-10.i386.rpm.  Mail now
works properly.

I have core files I can email to you if necessary.
Comment 1 John Franks 2000-08-20 11:04:56 EDT
I have observed the same problem.  It does not always core dump, but can
be reliably made to do so by almost any activity in mail and then the 
'q' command.
Comment 2 John Franks 2000-08-24 17:25:28 EDT
I got some free time and decided to look at this myself.
The bug was introduced with the patch mailx-8.1.1-environ.patch.

After applying this patch, the file fio.c contains

	case '&':
		if (name[1] == 0 && (name = value("MBOX")) == NOSTR)
		if (name[1] == 0 && (name = getenv("MBOX")) == NOSTR)
			name = "~/mbox";
		/* fall through */

The first "if" results in name == NULL and the second if evaluates
name[1].  Hence the core dump.  

It should look like
	case '&':
		if (name[1] == 0 && (name = value("MBOX")) == NOSTR)
		if ( (name = getenv("MBOX")) == NOSTR)
			name = "~/mbox";
		/* fall through */

A diff for the patch is appended.  Though patching patches may not
be a good idea.

John Franks 

--- mailx-8.1.1-environ.patch.orig	Thu Aug 24 15:54:19 2000
+++ mailx-8.1.1-environ.patch	Thu Aug 24 15:58:33 2000
@@ -61,7 +61,7 @@
  		return savestr(prevfile);
  	case '&':
  		if (name[1] == 0 && (name = value("MBOX")) == NOSTR)
-+		if (name[1] == 0 && (name = getenv("MBOX")) == NOSTR)
++		if ((name = getenv("MBOX")) == NOSTR)
  			name = "~/mbox";
  		/* fall through */

Comment 3 Jeff Johnson 2000-08-25 07:40:03 EDT
This is the same problem as bug #15728, fixed in Raw Hide but not in the Red Hat
6.2 errata.
Comment 4 John Franks 2000-08-25 09:50:10 EDT
Well, many of us are not permitted to see bug #15728.  I should have 
mentioned that a workaround is to add the line 

set MBOX=~/mbox

to your .mailrc file.
Comment 5 Hugh Bragg 2000-09-15 07:34:44 EDT
I have the same problem upgrading from mailx-8.1.1-10.i386.rpm and
I have many users do not want to remember yet another admin step.
Can't mailx be officially re-released with the fix some time soon?
Comment 6 Jeff Johnson 2000-11-02 08:49:10 EST
*** Bug 17535 has been marked as a duplicate of this bug. ***
Comment 7 Jeff Johnson 2000-11-02 09:12:45 EST
*** Bug 17461 has been marked as a duplicate of this bug. ***
Comment 8 Jeff Johnson 2000-11-02 09:15:06 EST
Fixes for bugs #14010, #15278, and  #10074 were not included in the released

Re-releasing mailx-8.1.1-20
Comment 9 jonathan 2001-01-09 11:27:43 EST
job@redhat.com wrote:

> Re-releasing mailx-8.1.1-20

But it has not yet shown up a sa Red Hat 6.2 erratum.  Wil it ever do so?


Jonathan Marsden <jonathan@xc.org>

Comment 10 Hugh Bragg 2001-04-23 02:22:10 EDT
If this is fixed then why is the lates version of mailx in the redhat updates
directory still
mailx-8.1.1-16.i386.rpm and mailx-8.1.1-16.src.rpm ?
Comment 11 Hugh Bragg 2001-05-11 10:23:14 EDT
Still no mailx-8.1.1-20 on the updates site in the SRPM or the i386 directories.
Why has this been resolved?
Comment 12 Hugh Bragg 2001-06-08 08:37:57 EDT
I can find mailx-8.1.1-21.*.rpm from Polished linux on rpmfind network.
Up2date wants to install mailx-8.1.1-16 when using mailx-8.1.1-10 from RH 6.2
unless the Polished version is installed. Once mailx-8.1.1-16 is installed, it
just crashes.

Note You need to log in before you can comment on or make changes to this bug.