projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91efcf6
)
git-fmt-patch: thinkofix to show [PATCH] properly.
author
Junio C Hamano
<junkio@cox.net>
Sat, 22 Apr 2006 10:06:13 +0000
(
03:06
-0700)
committer
Junio C Hamano
<junkio@cox.net>
Sat, 22 Apr 2006 10:06:13 +0000
(
03:06
-0700)
Updating "subject" variable without changing the hardcoded
number of bytes to memcpy from it would not help much.
Signed-off-by: Junio C Hamano <junkio@cox.net>
commit.c
patch
|
blob
|
history
diff --git
a/commit.c
b/commit.c
index
06e0098
..
f4e4eea
100644
(file)
--- 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);