summaryrefslogtreecommitdiff
path: root/fsck.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-12-22 12:27:41 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-12-22 12:27:41 -0800
commit1cb4b3d380fe42a837adfb68126a312f605680f8 (patch)
treea3051c8af64dda52e0c1b0c9826afa0d2d66515c /fsck.c
parentMerge branch 'po/doc-assume-unchanged' (diff)
parentindex-pack: terminate object buffers with NUL (diff)
downloadtgif-1cb4b3d380fe42a837adfb68126a312f605680f8.tar.xz
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))