Fix another off-by-one error in ZipFileRO

Bug: 10424836
Change-Id: I491458bd31ef39e87127d061427b32a3d59ac807
This commit is contained in:
Kenny Root
2013-09-11 15:28:39 -07:00
parent d292f790be
commit 1c7cf90af4

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);