From: Junio C Hamano Date: Thu, 21 May 2026 23:48:20 +0000 (+0900) Subject: Merge branch 'jk/commit-sign-overflow-fix' X-Git-Tag: v2.55.0-rc0~67 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=382705906f5b12980c8a4783a56b8374568a664f;p=thirdparty%2Fgit.git Merge branch 'jk/commit-sign-overflow-fix' Leakfix. * jk/commit-sign-overflow-fix: commit: handle large commit messages in utf8 verification --- 382705906f5b12980c8a4783a56b8374568a664f diff --cc commit.c index f7ea9d9928,cd49aada40..e3e7352e69 --- a/commit.c +++ b/commit.c @@@ -1642,13 -1642,13 +1642,13 @@@ static bool has_invalid_utf8(const cha * If it isn't, it assumes any non-utf8 characters are Latin1, * and does the conversion. */ -static int verify_utf8(struct strbuf *buf) +static int ensure_utf8(struct strbuf *buf) { int ok = 1; - long pos = 0; + size_t pos = 0; for (;;) { - int bad; + size_t bad; unsigned char c; unsigned char replace[2];