Re: [PATCH v4] utf8: replace utf8_strwidth todo with descriptive comment

"Hardik Kumar" <[email protected]> Tue, 28 Jul 2026 22:34:12 +0530
Newsgroups org.kernel.vger.git
Message-ID <[email protected]>
On Tue Jul 28, 2026 at 9:11 PM IST, Phillip Wood wrote:

> The last sentence does not really capture the reasons given in the 
> message of the commit that added this comment. If you haven't done so 
> already you should read it - see 937b71cc8b (utf8: fix overflow when 
> returning string width, 2022-12-01). The fundamental reason to call 
> cast_size_t_to_int(), rather than relying on an implicit conversion to 
> the return type, is not about changing signatures, it is about avoiding 
> an overflow that caused git to crash.

I did check that commit before. My attempt at explaining the reason
wasn't quite right. I have improved it in the next patch.

Thanks for the review.
Hardik