Subject: bin/196: mail dumps core if you have new mail
To: None <gnats-admin>
From: Rafal Boni <rafal@rafal.slip.uiuc.edu>
List: netbsd-bugs
Date: 04/01/1994 01:05:02
>Number: 196
>Category: bin
>Synopsis: mail dumps core if user has new mail
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: gnats-admin (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Apr 1 01:05:01 1994
>Originator: Rafal Boni
>Organization:
...me organized? Ha!
>Release: -current, SUP'd Mar. 30th
>Environment:
System: NetBSD rafal.slip.uiuc.edu 0.9a RAFAL#2 i386
Sources SUPed on Mar. 30, 1994
>Description:
Yet another missing cast to off_t causes mail to think that some
temp file or other [technical description, eh?] is munged. Mail
therefore panics and dumps core..
>How-To-Repeat:
1. Mail youself some junk
2. type "mail"
3. watch mail dump core..
>Fix:
*** fio.c.fixed Fri Apr 1 02:51:41 1994
--- fio.c Fri Apr 1 02:51:52 1994
***************
*** 209,217 ****
panic("Insufficient memory for %d messages", msgCount);
dot = message;
size -= sizeof (struct message);
fflush(f);
! (void) lseek(fileno(f), (off_t) sizeof *message, 0);
if (read(fileno(f), (char *) message, size) != size)
panic("Message temporary file corrupted");
message[msgCount].m_size = 0;
message[msgCount].m_lines = 0;
--- 209,217 ----
panic("Insufficient memory for %d messages", msgCount);
dot = message;
size -= sizeof (struct message);
fflush(f);
! (void) lseek(fileno(f), (long) sizeof *message, 0);
if (read(fileno(f), (char *) message, size) != size)
panic("Message temporary file corrupted");
message[msgCount].m_size = 0;
message[msgCount].m_lines = 0;
>Audit-Trail:
>Unformatted:
------------------------------------------------------------------------------