nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Updates to nmh

2009-01-16 15:56:43
Ken Hornstein wrote:
So ... what MTS are you using?  SMTP?  Or sendmail?  Does "-snoop" tell you
anything useful?  I thought what I did only affected the SMTP MTS, but
hey, I've been wrong before.

I use mts:sendmail (this is the Debian package default and generally what
I recommend people use because (a) nmh's SMTP talking code doesn't get
the corner cases of the spec right and (b) Unix systems should have a
sendmail binary that can do this kind of thing anyhow).

It turns out that send is calling post, which is segfaulting:

Program received signal SIGSEGV, Segmentation fault.
0xb7e58b35 in memcpy () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0  0xb7e58b35 in memcpy () from /lib/tls/i686/cmov/libc.so.6
#1  0x0804e908 in sm_fgetc (f=0x8093278) at smtp.c:1412
#2  0x0804eaa7 in smhear () at smtp.c:1332
#3  0x0804ff1f in sm_init (client=0x805fa20 "mnementh.archaic.org.uk", 
server=0x0, port=0x8058fe2 "smtp", watch=0,
    verbose=0, debug=0, onex=1, queued=0, sasl=0, saslmech=0x0, user=0x0) at 
smtp.c:394
#4  0x0804ba12 in post (file=0x8061c80 "/home/pm215/Mail/postLEAgOY", bccque=0, 
talk=1) at post.c:1414
#5  0x0804cd7a in main (argc=Cannot access memory at address 0x26
) at post.c:641

This is because you're trying to use sasl_inbuffer, but this is only
allocated in smtp_init() and not sendmail_init(), so if you're using
sendmail then it just crashes...

I also noticed a compile warning:
./client.c: In function â??clientâ??:
./client.c:88: warning: passing argument 6 of â??getnameinfoâ?? makes integer 
from pointer without a cast

I guess technically that should be "0".  I forget on some el-lamo systems
NULL is not defined as 0, but includes a cast to (void *).  Should be
harmless, though.

I'm vaguely trying to eliminate compiler warnings.

 Guess I missed it in the bazillion warnings about
mismatches between unsigned char * and signed char *.

I never notice these because I always compile with CFLAGS including
-Wno-pointer-sign. I suppose I should push that into CVS somehow.

-- PMM


_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>