On Mai 17 2024, Grisha Levit wrote:

> The current cmp implementation for size and blocks subtracts the two
> values and returns the difference as an int. This subtraction can
> overflow, and the returned int can end up having the wrong sign.

In the case of globsort_sizecmp, since off_t is wider than int, it can
return a wrong value even if the subtraction doesn't overflow.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

Reply via email to