On Wed, Aug 31, 2011 at 11:11:49AM +0200, Michał Górny wrote: > @@ -478,18 +481,20 @@ static void find_subpos(const char *buf, unsigned long sz, const char **sub, con > buf = strchr(buf, '\n'); > if (!buf) { > *body = ""; > + *signature = *body; > return; /* no body */ > } > while (*buf == '\n') > buf++; /* skip blank between subject and body */ > *body = buf; > + *signature = buf + parse_signature(buf, strlen(buf)); Hmm. I had doubts at first that "buf" is guaranteed to be NUL-terminated, since we are passing around the "sz" parameter (though note that we also use strchr already). But I think it is OK, as the buffer comes from read_sha1_file, which defensively NUL-terminates all objects we get. Other than that, the patch looks fine. It could use some tests, so I'll follow up with some: [1/2]: t7004: factor out gpg setup [2/2]: t6300: test new content:* for-each-ref placeholders -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