Merge "libziparchive: verify that gpb flags match" into oc-dev am: 91e3f638b7
am: 9a43accb26

Change-Id: I32e77816e59db0b37ac08567556fb2832ab1cf89
diff --git a/libziparchive/zip_archive.cc b/libziparchive/zip_archive.cc
index 6497a3c..78de40a 100644
--- a/libziparchive/zip_archive.cc
+++ b/libziparchive/zip_archive.cc
@@ -577,9 +577,9 @@
   // 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;