]> git.ipfire.org Git - thirdparty/libarchive.git/commit
zip writer: don't append unused NUL for directories
authorJoerg Sonnenberger <joerg@bec.de>
Wed, 2 Oct 2019 10:21:20 +0000 (12:21 +0200)
committerJoerg Sonnenberger <joerg@bec.de>
Wed, 2 Oct 2019 10:21:20 +0000 (12:21 +0200)
commitfad95df78681894f8e54a7867e738572f413dd30
tree305af3d2091ebf8dd7bf700ebcf22d827881b2e2
parent2f3033ca23f8c21160506c3c7ac8a0df0d3fde42
zip writer: don't append unused NUL for directories

This can result in a heap overflow dependening on the buffer allocation.
Simplify the path length calculation and avoid binary operands.

Based on PR #1255 from Will Wagner
libarchive/archive_write_set_format_zip.c