Merge "libziparchive: verify that gpb flags match" into oc-dev

am: 91e3f638b7

Change-Id: I4b3f7e5845779c94d42c7e78548ed2e085619990
This commit is contained in:
Adam Lesinski 2017-04-11 19:46:33 +00:00 committed by android-build-merger
commit 9a43accb26

View file

@ -574,9 +574,9 @@ static int32_t FindEntry(const ZipArchive* archive, const int ent,
// Paranoia: Match the values specified in the local file header
// to those specified in the central directory.
// Verify that the central directory and local file header agree on the use of a trailing
// Data Descriptor.
if ((lfh->gpb_flags & kGPBDDFlagMask) != (cdr->gpb_flags & kGPBDDFlagMask)) {
// Verify that the central directory and local file header have the same general purpose bit
// flags set.
if (lfh->gpb_flags != cdr->gpb_flags) {
ALOGW("Zip: gpb flag mismatch. expected {%04" PRIx16 "}, was {%04" PRIx16 "}",
cdr->gpb_flags, lfh->gpb_flags);
return kInconsistentInformation;