[comp.mail.elm] Elm crashes on long "To:" lines + fix

tjc@ecs.soton.ac.uk (Tim Chown) (02/09/91)

I recently discovered that Elm crashes on long "To:" lines (of a
few lines) which though rare do occur.  The crash occurs when
replying to or copying a message with a long "To:" line, the 
segmentation violation coming in src/returnadd.c, line 337.
This was with 2.3PL11, but may occur in previous versions.

Syd's comment on this was that Elm as implemented uses fixed length
strings and a major rewrite would be needed to get round this.

As an alternative, I suggest that when compiling Elm you use
a value of at least 1024 for SLEN in hdrs/defs.h, rather than
the default of 256.

I don't believe there are any ill effects from this.  Perhaps Syd
can comment publicly ??

Tim

syd@DSI.COM (Syd Weinstein) (02/12/91)

tjc@ecs.soton.ac.uk (Tim Chown) writes:
>I recently discovered that Elm crashes on long "To:" lines (of a
>few lines) which though rare do occur.  The crash occurs when
>replying to or copying a message with a long "To:" line, the 
>segmentation violation coming in src/returnadd.c, line 337.
>This was with 2.3PL11, but may occur in previous versions.

>Syd's comment on this was that Elm as implemented uses fixed length
>strings and a major rewrite would be needed to get round this.

>As an alternative, I suggest that when compiling Elm you use
>a value of at least 1024 for SLEN in hdrs/defs.h, rather than
>the default of 256.

>I don't believe there are any ill effects from this.  Perhaps Syd
>can comment publicly ??
Other than memory space, no ill effects.  However, the more proper
solution is to fix how Elm parses return addresses for this problem.
If all that is desired is to figure out the save name, the To: address
can be chopped after the first comma not in comments, if its for a group
reply, then the address needs to be built in sections.

Of course, the proper method is dynamic strings.

But, neither of these is planned any time soon.

-- 
=====================================================================
Sydney S. Weinstein, CDP, CCP                   Elm Coordinator
Datacomp Systems, Inc.                          Voice: (215) 947-9900
syd@DSI.COM or dsinc!syd                        FAX:   (215) 938-0235