From 6822ea3f2e4e733a38dc03892f6337f30bf75a29 Mon Sep 17 00:00:00 2001 From: Ivan Kutepov Date: Sat, 13 Jan 2018 22:33:40 +0300 Subject: Fix wrong backport of commit 9dced16 * https://android.googlesource.com/platform/system/core/+/9dced1626219d47c75a9d37156ed7baeef8f6403 Change-Id: I393ae072f59548988eeae03afb7fd994545413e9 --- libziparchive/zip_archive.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libziparchive/zip_archive.cc') diff --git a/libziparchive/zip_archive.cc b/libziparchive/zip_archive.cc index b93d192fe..75f3262ea 100644 --- a/libziparchive/zip_archive.cc +++ b/libziparchive/zip_archive.cc @@ -634,8 +634,8 @@ static int32_t ParseZipArchive(ZipArchive* archive) { } uint32_t lfh_start_bytes; - if (!ReadAtOffset(archive->fd, reinterpret_cast(&lfh_start_bytes), - sizeof(uint32_t), 0)) { + if (ReadAtOffset(archive->fd, reinterpret_cast(&lfh_start_bytes), + sizeof(uint32_t), 0) != sizeof(uint32_t)) { ALOGW("Zip: Unable to read header for entry at offset == 0."); return -1; } -- cgit v1.2.3