Re: Corrupted "return address"

"sq sub" <[email protected]>
Newsgroups gmane.mail.sqwebmail
Message-ID <[email protected]>
I have done some further work on this and had a dig round in the "C" code. I 
have found that the newmsg.c gets the return address and the forks to rexec 
the sendit.sh. I added a couple of syslog's to look at the variable 
returnaddr just before and just after it does the fork(). Ie one from each 
process. The one in the main program logs ok, the forked version is 
corrupted, eg: 


Apr  5 18:59:38 webmail sqwebmaild: [email protected]
Apr  5 18:59:38 webmail sqwebmaild: Hæ^_@Hæ^_@[email protected] 

So something goes wrong with the fork(). I checked on the net and found that 
gcc 2.96-98 did have a problem on my version on redhat (7.2) so I upgraded 
it to the latest. It still does not work! I can't remember enough "C" to be 
able to work out exactly what the problem is! so to get it up and running a 
did a dirty fudge! 

1, changed the returnaddr from a pointer to a static of fixed length 
256bytes. 

2, did a strncpy(returnaddr,login_returnaddr(),255); before the call to 
fork(). 

I know this is  a bit of a fudge but it does work, I think mainly because 
static's don't use the stack theuse the datasegment in main memory. 

Any how I home this points you in the right direction - and it works - this 
message was sent for the first time using v 4.0.2 

I would be interested to see the proper fix. 

DEREK 

Sam Varshavchik writes: 

> Jean Caron writes: 
> 
>> Curious. I had forgotten this step myself and was having the exact same 
>> problem. Running make install-configure fixed it. Afterwards, I got a 
>> dozen or so more corrupted messages, which were stuck in the queue from 
>> before. Now it's all good.
> 
> Actually, this bug is for real.  Someone else has tracked down what the 
> problem was, and I'll fix it shortly. 
> 
> Remain calm. 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.