segmentation fault in dccproc (1.3.24)

Jeff Mincy mincy@rcn.com
Sat Dec 10 18:03:13 UTC 2005


On Sat, 10 Dec 2005, vjs@calcite.rhyolite.com wrote:

>> From: Jeff Mincy 
> 
>> gdb reports the segmentation fault occurs at this call to STRLCPY
> 
>>     #undef HAVE_STRLCPY.
>> So, I'm presumably getting this definition:
>>    ./include/dcc_defs.h:#define STRLCPY(d,s,lim) ((d)[(lim)-1] = '\0', strncpy(d,s,(lim)-1))
>>
>> Doing if (i > 0) { ... } around the STRLCPY prevented the segmentation fault.
> 
> Thank you for figuring out the problem.  The headers would not have been
> enough, because I was not seeing the 0 length and the strlcpy() in FreeBSD
> is silent (i.e. doesn't crash) on that error.

It was easy enough, once I recompiled with -g.  Just out of curiosity,
is there an easy way to get compiler flags like those in DBGFLAGS set
during ./configure?

> Besides making STRLCPY() not crash with lim=0,
> dccproc needs to not try to copy a mail_host of length -1.

BTW, in case anybody else runs into the same problem.
This dccproc error was caused messages like this in 3.0.4 SpamAssassin:
  DCC -> check failed: Died at /usr/lib/perl5/site_perl/5.6.1/Mail/SpamAssassin/Dns.pm line 806.
The error message just meant that DCC aborted without printing the DCC
header.

-jeff



More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.