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
This commit is contained in:
3
fsck.c
3
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))
|
||||
|
||||
Reference in New Issue
Block a user