Subject: bin/3083: /usr/bin/mail counts lines improperly
To: None <gnats-bugs@gnats.netbsd.org, rhialto@polder.ubc.kun.nl>
From: Olaf Seibert <rhialto@polder.ubc.kun.nl>
List: netbsd-bugs
Date: 01/06/1997 11:28:52
>Number:         3083
>Category:       bin
>Synopsis:       #lines of mails with >32767 lines are incorrectly counted
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan  6 02:35:02 1997
>Last-Modified:
>Originator:     Olaf Seibert
>Organization:
___ Olaf 'Rhialto' Seibert      D787B44DFC896063 4CBB95A5BD1DAA96 
\X/ Don't dream it, Be it               rhialto@polder.ubc.kun.nl
>Release:        1.2
>Environment:
System: NetBSD polder.ubc.kun.nl 1.2 NetBSD 1.2 (POLDER) #1: Thu Dec 12 21:53:41 MET 1996 rhialto@polder.ubc.kun.nl:/home/src/sys/arch/i386/compile/POLDER i386


>Description:

If you get a mail of more than 32767 lines, /usr/bin/mail improperly
displays its number of lines. This is mostly annoying since it will
then not use the pager to display the mail, even though it is excessively
long.

& h
>  71 root                  Sat Jan  4 05:41 -29912/1353376
&

wc toolongmail gives
   35625   43529 1353386 toolongmail

>How-To-Repeat:

Send yourself a very long mail, and use the h command in /usr/bin/mail.

>Fix:

It looks like somebody mistakenly decided to use a short to
count the number of lines in a mail. Should be easy to fix.
If I had source on-line, I'd include a patch.

>Audit-Trail:
>Unformatted: