summaryrefslogtreecommitdiff
path: root/convert.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-03-03 15:15:38 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-03-03 15:15:38 +0900
commitbc01ef0d3f3f79fc2f1a9e5e1a6ac0049e7a3c26 (patch)
tree2f4f641fe1d78571baaa7e90f11d79aeea8aad26 /convert.c
parentcab8b4084d97b4c063bd8546fe6d68a49374016f (diff)
downloadgit-upstream/2.7.0.tar.gz
git-upstream/2.7.0.tar.bz2
git-upstream/2.7.0.zip
Imported Upstream version 2.7.0upstream/2.7.0
Diffstat (limited to 'convert.c')
-rw-r--r--convert.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/convert.c b/convert.c
index f3bd3e93..814e8144 100644
--- a/convert.c
+++ b/convert.c
@@ -1289,7 +1289,8 @@ static struct stream_filter *ident_filter(const unsigned char *sha1)
{
struct ident_filter *ident = xmalloc(sizeof(*ident));
- sprintf(ident->ident, ": %s $", sha1_to_hex(sha1));
+ xsnprintf(ident->ident, sizeof(ident->ident),
+ ": %s $", sha1_to_hex(sha1));
strbuf_init(&ident->left, 0);
ident->filter.vtbl = &ident_vtbl;
ident->state = 0;