diff options
author | Junio C Hamano <junkio@cox.net> | 2007-05-06 00:21:03 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-05-06 00:21:03 -0700 |
commit | 125a5f1c2a93f217e92dd88210c2cb503032c02f (patch) | |
tree | adfe643504e7bfa6b3bdaf47b9ff5df3d5ba7349 /commit.c | |
parent | cc0e6c5adc783bcb29954f3a0b7a6197bcc9b1b3 (diff) | |
parent | e102d4353d7cfd69a597cd976eabdcb74641be69 (diff) | |
download | git-125a5f1c2a93f217e92dd88210c2cb503032c02f.tar.gz |
Merge branch 'maint'
* maint:
Small correction in reading of commit headers
Documentation: fix typo in git-remote.txt
Add test for blame corner cases.
blame: -C -C -C
blame: Notice a wholesale incorporation of an existing file.
Fix --boundary output
diff format documentation: describe raw combined diff format
Mention version 1.5.1 in tutorial and user-manual
Add --no-rebase option to git-svn dcommit
Fix markup in git-svn man page
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -638,7 +638,9 @@ static char *get_header(const struct commit *commit, const char *key) next = NULL; } else next = eol + 1; - if (!strncmp(line, key, key_len) && line[key_len] == ' ') { + if (eol - line > key_len && + !strncmp(line, key, key_len) && + line[key_len] == ' ') { int len = eol - line - key_len; char *ret = xmalloc(len); memcpy(ret, line + key_len + 1, len - 1); |