]> git.ipfire.org Git - thirdparty/xz.git/commit
lzmainfo: Avoid integer overflow
authorTobias Stoeckmann <tobias@stoeckmann.org>
Mon, 16 Sep 2024 21:19:46 +0000 (23:19 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Mon, 16 Sep 2024 22:26:02 +0000 (01:26 +0300)
commit76cfd0a9bb33ae8e534b1f73f6359dc825589f2f
tree4a109203d53f959e9c58a2d22c554678efa594ba
parent78355aebb7fb654302e5e33692ba109909dacaff
lzmainfo: Avoid integer overflow

The MB output can overflow with huge numbers. Most likely these are
invalid .lzma files anyway, but let's avoid garbage output.

lzmadec was adapted from LZMA Utils. The original code with this bug
was written in 2005, over 19 years ago.

Co-authored-by: Lasse Collin <lasse.collin@tukaani.org>
Closes: https://github.com/tukaani-project/xz/pull/144
src/lzmainfo/lzmainfo.c