Merge "Fix another off-by-one error in ZipFileRO" into klp-dev

This commit is contained in:
Kenny Root
2013-09-11 22:37:02 +00:00
committed by Android (Google) Code Review

View File

@@ -645,7 +645,7 @@ bool ZipFileRO::getEntryInfo(ZipEntryRO entry, int* pMethod, size_t* pUncompLen,
if (method == kCompressStored &&
((dataOffset >= cdOffset) ||
(uncompLen >= (cdOffset - dataOffset))))
(uncompLen > (cdOffset - dataOffset))))
{
ALOGE("ERROR: bad uncompressed length in zip (%ld + " ZD " > %ld)\n",
(long) dataOffset, (ZD_TYPE) uncompLen, (long) cdOffset);