]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Fix intermittent segfault when reading zip files
authorPaul Barker <paul@paulbarker.me.uk>
Sun, 6 Apr 2014 21:54:48 +0000 (22:54 +0100)
committerPaul Barker <paul@paulbarker.me.uk>
Sun, 6 Apr 2014 21:58:55 +0000 (22:58 +0100)
commit3bd37337e6c299beb493ba7633042b9b5cae763c
treeffe5a39e7f9b6f37a0dbd8b8bc1d791db371eaf2
parent4d0021541be1ebcb2715a3aa4fa5202efa686b2f
Fix intermittent segfault when reading zip files

When looking up the compression name for a zip file the index variable was being
incremented too soon. Thus element zero ("uncompressed") was never checked and
reads could be made past the end of the array. This was causing intermittent
segfaults in the call to sprintf in zip_read_local_file_header.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
libarchive/archive_read_support_format_zip.c