]> git.ipfire.org Git - thirdparty/libarchive.git/commit
lha: Fix integer truncation on 32 bit systems (#2161)
authorTobias Stoeckmann <stoeckmann@users.noreply.github.com>
Sat, 4 May 2024 19:17:21 +0000 (21:17 +0200)
committerGitHub <noreply@github.com>
Sat, 4 May 2024 19:17:21 +0000 (12:17 -0700)
commit6818dd167cb190c76e0cfdeb40cd73aa22b96bd8
tree6b5776afa19a9dcb97096b905a0e24ddfa402167
parent7a6bb5f5ac3fd1f343577ae667d1829fbeacfb74
lha: Fix integer truncation on 32 bit systems (#2161)

The comp size could be around INT_MAX on huge archives, which would lead
to eventual integer truncation to size_t in archives with version 1
headers when fixed value 2 is added to comp_size on 32 bit systems.

This fix is a no-op on 64 bit systems because size_t and uint64_t are of
same size there.
libarchive/archive_read_support_format_lha.c