TIP: Click on subject to list as thread! ANSI
echo: msged_echo
to: Andrew Clarke
from: Paul Edwards
date: 1997-03-25 10:06:08
subject: bug

This is a bug I had with msged 4.00, which I had running on my other
system. In readmail.c...

int writemsg(msg * m)
{
    char text[25500];   /* I had to increase this */
    
    /* If there isnt't a terminating '\r' on the last line, add one. */

    if (!curr->text || (curr->text && strchr(curr->text,
'\r') == NULL))
    {
        sprintf(text, "%s\r", curr->text);   /* I think
because of this */
        release(curr->text);    /* although the actual trap was here */
        curr->text = xstrdup(text);
    }


Obviously the proper solution isn't to create 25500 of stack, but I have
not yet seen the problem in 4.2 beta, so have not done anything about it. 
Also, at this stage I do not know if it is a bug in the external editor
(e.g.) not terminating the line with '\r', or maybe creating too big lines,
etc, etc.

I was tempted to copy some code further up, which did a malloc of the
memory before putting a '\r' on it.  I think that's likely to be the
correct solution, but for the moment, I'm waiting.  BFN.  Paul.
@EOT:

---

SD®¯ÌÍ!
* Origin: X (3:711/934.9)
SEEN-BY: 633/267 270
@PATH: 711/934 712/624 50/99 635/728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.