From: René Scharfe Date: Sat, 15 Mar 2025 06:38:59 GMT Subject: Re: [PATCH] xdiff: avoid arithmetic overflow in xdl_get_hunk() Message-ID: <8c9a3966-2746-4619-9f77-ca95797dcab8@web.de> In-Reply-To: Am 14.03.25 um 23:28 schrieb Junio C Hamano: > René Scharfe writes: > >> t/t4055-diff-context.sh | 10 ++++++++++ >> xdiff/xemit.c | 8 +++++++- >> 2 files changed, 17 insertions(+), 1 deletion(-) > > Oh, I love a patch like this that is well thought out to carefully > check the bounds, instead of blindly say "ah, counting number of > things in size_t solves everything" ;-) Converting xdiff from long to size_t is still a good idea, I think, but would be lot more effort and thus more risky. Comparisons to upstream would become a lot more noisy as well. René