]> git.ipfire.org Git - thirdparty/libarchive.git/commit
libarchive/{b64,uu}: Improve atol8 checks 2911/head
authorTobias Stoeckmann <tobias@stoeckmann.org>
Mon, 16 Mar 2026 15:00:30 +0000 (16:00 +0100)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Mon, 16 Mar 2026 15:53:29 +0000 (16:53 +0100)
commit7ea0c525194e893b9c9cd0a9170f7049db519bca
tree959ceefab8440591d7c083a6bfed93b382cb402b
parent339e3fe76f5ebccef950572809a496e13c78aea6
libarchive/{b64,uu}: Improve atol8 checks

Make sure that supplied values cannot overflow int64_t, which would be
an undefined behavior. Also do not accept empty strings as numbers.

Last but not least, check values before casting them to target data
types to avoid truncations.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
libarchive/archive_write_add_filter_b64encode.c
libarchive/archive_write_add_filter_uuencode.c