const char *end = buf + strlen(buf);
const char *sigstart;
+ /* parse signature first; we might not even have a subject line */
+ parse_signature(buf, end - buf, &payload, &signature);
/* skip past header until we hit empty line */
while (*buf && *buf != '\n') {
/* skip any empty lines */
while (*buf == '\n')
buf++;
-
- /* parse signature first; we might not even have a subject line */
- parse_signature(buf, end - buf, &payload, &signature);
*sig = strbuf_detach(&signature, siglen);
sigstart = buf + parse_signed_buffer(buf, strlen(buf));
v->s = xmemdupz(sigpos, siglen);
else if (atom->u.contents.option == C_LINES) {
struct strbuf s = STRBUF_INIT;
- const char *contents_end = bodylen + bodypos - siglen;
+ const char *contents_end = bodypos + nonsiglen;
/* Size is the length of the message after removing the signature */
append_lines(&s, subpos, contents_end - subpos, atom->u.contents.nlines);