diff options
author | Adam Lesinski <adamlesinski@google.com> | 2014-05-14 20:30:09 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-05-14 20:30:09 +0000 |
commit | f8c940733ed0aaa95a66cb80181f08e39e4592fa (patch) | |
tree | 6ae5fc84a106bb38ec2bf77b8d14de8f73c4152a /libs | |
parent | 2cf184233ba5a596a4fc187289bba848ff341cf1 (diff) | |
parent | 7322ea7b73000ef50be18d72750624bb1832dec4 (diff) | |
download | frameworks_base-f8c940733ed0aaa95a66cb80181f08e39e4592fa.zip frameworks_base-f8c940733ed0aaa95a66cb80181f08e39e4592fa.tar.gz frameworks_base-f8c940733ed0aaa95a66cb80181f08e39e4592fa.tar.bz2 |
Merge "Fix potential crash in libandroidfw"
Diffstat (limited to 'libs')
-rw-r--r-- | libs/androidfw/ResourceTypes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp index 6aad5fb..7d4da01 100644 --- a/libs/androidfw/ResourceTypes.cpp +++ b/libs/androidfw/ResourceTypes.cpp @@ -102,7 +102,7 @@ static status_t validate_chunk(const ResChunk_header* chunk, if (headerSize >= minSize) { if (headerSize <= size) { if (((headerSize|size)&0x3) == 0) { - if ((ssize_t)size <= (dataEnd-((const uint8_t*)chunk))) { + if ((size_t)size <= (size_t)(dataEnd-((const uint8_t*)chunk))) { return NO_ERROR; } ALOGW("%s data size 0x%x extends beyond resource end %p.", |