]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Fix a potential NULL pointer dereference of `tar` in archive_read_support_format_tar...
authorngie <yaneurabeya@users.noreply.github.com>
Sun, 15 Oct 2017 17:59:07 +0000 (10:59 -0700)
committerJoerg Sonnenberger <joerg@bec.de>
Sun, 15 Oct 2017 17:59:07 +0000 (19:59 +0200)
commitf5e11acaa8779738ce166b266d1cd3ad1e666a37
tree182e8eff80136c15b4e4656044f13d2309b3af82
parentade4bdb7b29ae1425c1e09cc7fdf68209564897c
Fix a potential NULL pointer dereference of `tar` in archive_read_support_format_tar when HAVE_COPYFILE_H is defined (#959)

If HAVE_COPYFILE_H is defined and allocating tar via calloc fails, tar
would be dereferenced before the tar == NULL check is done, causing a
NULL pointer dereference. Move the HAVE_COPYFILE_H block after the NULL
dereference check.
libarchive/archive_read_support_format_tar.c