summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--commit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/commit.c b/commit.c
index 06e0098..f4e4eea 100644
--- a/commit.c
+++ b/commit.c
@@ -574,8 +574,9 @@ unsigned long pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit
}
if (subject) {
- memcpy(buf + offset, subject, 9);
- offset += 9;
+ int slen = strlen(subject);
+ memcpy(buf + offset, subject, slen);
+ offset += slen;
}
memset(buf + offset, ' ', indent);
memcpy(buf + offset + indent, line, linelen);