Re: mailfront segfault continues

Dale Woolridge <[email protected]> Fri, 19 Aug 2005 02:49:33 -0400
Newsgroups gmane.comp.sysutils.bgware
Message-ID <[email protected]>
On 18-Aug-2005 22:26 [email protected] wrote:
| 
| Well, I just recompiled from sources since the rpm strips the
| binaries, and here is what I get when running the new binary from gdb

    Maybe you should recompile bglibs from source if you haven't
    already done that too.  str_findlast() is a macro for str_findprev(),
    below:

      /** Find the previous instance of the given character on or before \c pos */
      int str_findprev(const str* s, char ch, unsigned pos)
      {
	char* p;
	if (pos >= s->len) pos = s->len - 1;
	for (p = s->s + pos; p >= s->s; --p)
	  if (*p == ch) return p - s->s;
	return -1;
      }

    What if s->len = 0, which appears to be the case.  I think the
    pointer arithmetic in the assignment of the for loop works
    in 32-bit, but not 64-bit, at least not with the given types.
    Anyway, if you could walk through this section of code after
    setting a breakpoint in backend_validate_sender, it might
    be fruitful.
--
-dale