Bug 58672 - long email overflows short used to hold message length
Summary: long email overflows short used to hold message length
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mailx   
(Show other bugs)
Version: 7.1
Hardware: All Linux
Target Milestone: ---
Assignee: Ivana Varekova
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2002-01-22 17:17 UTC by B Griffin
Modified: 2007-04-18 16:39 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-02 14:45:10 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description B Griffin 2002-01-22 17:17:53 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.2-2 i686; Nav)

Description of problem:
Very long pieces of email overflow the short used to hold the message length.
displaying available messages the message length will often be negative when
happens. Then since the message appears so "small", mailx does not use a pager
to display the message but just dumps it to the screen.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create a mailbox with a message with a number of body lines greater than a
2. Open that mailbox with mailx.
3. Try to read that message.

Actual Results:  Huge message gets dumped to the screen.

Expected Results:  Huge message should be displayed with a pager.

Additional info:

I've got a bunch of mods now to mailx, so diff gives me a lot of output. (I am
also using a mailx from an earlier version of RedHat, but I did just verify that
this still exists in my new RH7.1 install.) I believe this patch will completely
the problem:

--- mailx-8.1.1/def.h   Fri Jun 14 01:26:58 1996
+++ mailx-8.1.1-mine/def.h      Wed Mar  1 11:57:51 2000
@@ -71,10 +71,14 @@

 struct message {
        short   m_flag;                 /* flags, see below */
-       short   m_block;                /* block number of this message */
-       short   m_offset;               /* offset in block of message */
+       /* block, offset and lines should not be shorts (as they were
+       ** in the past) since those are too easy to overflow with large
+       ** mail messages.
+       **/
+       long    m_block;                /* block number of this message */
+       long    m_offset;               /* offset in block of message */
        long    m_size;                 /* Bytes in the message */
-       short   m_lines;                /* Lines in the message */
+       long    m_lines;                /* Lines in the message */

Comment 1 Need Real Name 2003-12-31 07:00:38 UTC
This bug is also in version 9.

Comment 2 Ivana Varekova 2004-11-15 12:44:53 UTC
Thank you for your notice.
The problem was fixed.

Comment 3 Ivana Varekova 2004-12-02 14:45:10 UTC
Solved with -40.

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