mirror of
https://git.tukaani.org/xz.git
synced 2026-10-31 03:14:56 +00:00
If at least three files are passed to xz --list, the totals might exceed the range of uint64_t. Previously wrong totals were displayed in this case. Now an error is shown as soon as an overflow would occur, and the remaining files aren't processed. In most other cases an error doesn't prevent xz from processing the remaining files, but in this case it feels OK because (1) the error should be very rare, (2) it keeps the code slightly simpler, and (3) with xz --robot --list the caller will likely ignore the output anyway when xz exits with a non-zero status. Co-authored-by: Lasse Collin <lasse.collin@tukaani.org> Fixes: https://github.com/tukaani-project/xz/pull/240