[imapfilter-devel] Small bug in response.c
Lefteris Chatzibarbas
lefcha at hellug.gr
Wed May 25 21:39:07 EEST 2005
On Wed, May 25, 2005 at 01:07:10PM +0300, Lefteris Chatzibarbas wrote:
> On Wed, May 25, 2005 at 11:19:33AM +0200, Per Westerlund wrote:
> > (imapfilter-1.0.1)
> >
> > Hi,
> >
> > while debugging another problem, I ran imapfilter with -d and got a core
> > dump. I isolated this problem to the debug printout in the function
> > response_namespace() in the file "response.c".
> >
> > In my environment, there is no namespace prefix, so the initialization
> >
> > ssn->ns.prefix = NULL;
> >
> > never gets changed. Later, when we get to the line
> >
> > debug("namespace (%d): '%s' '%c'\n", ssn->socket, ssn->ns.prefix,
> > ssn->ns.delim);
> >
> > ssn->ns.prefix is still NULL, and using that with a "%s" format blows up
> > on my machine.
>
> I will correct this problem.
>
> Thanks.
Oh, and as a quick fix, for now, you can change the above line to:
debug("namespace (%d): '%s' '%c'\n", ssn->socket,
(ssn->ns.prefix ? ssn->ns.prefix : ""), ssn->ns.delim);
More information about the Imapfilter-devel
mailing list