summaryrefslogtreecommitdiff
path: root/fsck.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-12-22 12:27:41 -0800
committerJunio C Hamano <gitster@pobox.com>2014-12-22 12:27:41 -0800
commit1cb4b3d380fe42a837adfb68126a312f605680f8 (patch)
treea3051c8af64dda52e0c1b0c9826afa0d2d66515c /fsck.c
parent14d4aab3bbd4cb25a4ccd16dc778c4c6c0a77c73 (diff)
parenta1e920a0a7747f0820e62b22b67fd36fb1d74607 (diff)
downloadgit-1cb4b3d380fe42a837adfb68126a312f605680f8.tar.gz
Merge branch 'js/fsck-tag-validation'
New tag object format validation added in 2.2 showed garbage after a tagname it reported in its error message. * js/fsck-tag-validation: index-pack: terminate object buffers with NUL fsck: properly bound "invalid tag name" error message
Diffstat (limited to 'fsck.c')
-rw-r--r--fsck.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fsck.c b/fsck.c
index 0324194631..10bcb65151 100644
--- a/fsck.c
+++ b/fsck.c
@@ -426,7 +426,8 @@ static int fsck_tag_buffer(struct tag *tag, const char *data,
}
strbuf_addf(&sb, "refs/tags/%.*s", (int)(eol - buffer), buffer);
if (check_refname_format(sb.buf, 0))
- error_func(&tag->object, FSCK_WARN, "invalid 'tag' name: %s", buffer);
+ error_func(&tag->object, FSCK_WARN, "invalid 'tag' name: %.*s",
+ (int)(eol - buffer), buffer);
buffer = eol + 1;
if (!skip_prefix(buffer, "tagger ", &buffer))