]> git.cameronkatri.com Git - cgit.git/blobdiff - parsing.c
tests: skip tests if strace is not functional
[cgit.git] / parsing.c
index e224564dc5346e74300ca35b567a6799f701ca57..93b4767ee57f2c7d66a01a0daf718d366d204b1a 100644 (file)
--- a/parsing.c
+++ b/parsing.c
@@ -77,7 +77,7 @@ static void parse_user(const char *t, char **name, char **email, unsigned long *
 
                email_len = ident.mail_end - ident.mail_begin;
                *email = xmalloc(strlen("<") + email_len + strlen(">") + 1);
-               sprintf(*email, "<%.*s>", email_len, ident.mail_begin);
+               xsnprintf(*email, email_len + 3, "<%.*s>", email_len, ident.mail_begin);
 
                if (ident.date_begin)
                        *date = strtoul(ident.date_begin, NULL, 10);
@@ -129,7 +129,7 @@ struct commitinfo *cgit_parse_commit(struct commit *commit)
 {
        const int sha1hex_len = 40;
        struct commitinfo *ret;
-       const char *p = get_cached_commit_buffer(commit, NULL);
+       const char *p = repo_get_commit_buffer(the_repository, commit, NULL);
        const char *t;
 
        ret = xcalloc(1, sizeof(struct commitinfo));