Bug 58672 - long email overflows short used to hold message length
long email overflows short used to hold message length
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: mailx (Show other bugs)
7.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ivana Varekova
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-01-22 12:17 EST by B Griffin
Modified: 2007-04-18 12:39 EDT (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description B Griffin 2002-01-22 12:17:53 EST
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.
When
displaying available messages the message length will often be negative when
this
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:
Always

Steps to Reproduce:
1. Create a mailbox with a message with a number of body lines greater than a
short.
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
fix
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 02:00:38 EST
This bug is also in version 9.
Comment 2 Ivana Varekova 2004-11-15 07:44:53 EST
Thank you for your notice.
The problem was fixed.
IV
Comment 3 Ivana Varekova 2004-12-02 09:45:10 EST
Solved with -40.

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