Fixes: port patches from libarchive
Porting the patch from https://github.com/libarchive/libarchive/commit/bff38efe8c110469c5080d387bec62a6ca15b1a5, which fixes a null pointer dereference issue of the libarchive lib in CMake.
Porting the patch from https://github.com/libarchive/libarchive/commit/bff38efe8c110469c5080d387bec62a6ca15b1a5, which fixes a null pointer dereference issue of the libarchive lib in CMake.