On Fri, Sep 02, 2011 at 07:39:26PM +0200, Michał Górny wrote: > > > + /* When having a signed tag without body, format_subject() > > > + * will start to eat the signature. */ > > > + if (buf > *signature) > > > + *body = *signature; > > > + else /* - 1 to get a trailing newline to strip */ > > > + *body = buf - 1; > > > > This last line is wrong if there is no trailing newline, no? Running > > even the existing tests in t6300 against your new patch, I get: > [...] > > Any suggestion how to strip trailing newlines? Just looking at your patch, it might work to do: else if (*buf == '\n') *body = buf - 1; else *body = buf; But there may be other corner cases. I need to read through the code more carefully, which I should have time to do later today. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html