Loading libutils/FileMap.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,10 @@ bool FileMap::create(const char* origFileName, int fd, off64_t offset, size_t le adjust = offset % mPageSize; adjOffset = offset - adjust; adjLength = length + adjust; if (__builtin_add_overflow(length, adjust, &adjLength)) { ALOGE("adjusted length overflow: length %zu adjust %d", length, adjust); return false; } flags = MAP_SHARED; prot = PROT_READ; Loading Loading
libutils/FileMap.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,10 @@ bool FileMap::create(const char* origFileName, int fd, off64_t offset, size_t le adjust = offset % mPageSize; adjOffset = offset - adjust; adjLength = length + adjust; if (__builtin_add_overflow(length, adjust, &adjLength)) { ALOGE("adjusted length overflow: length %zu adjust %d", length, adjust); return false; } flags = MAP_SHARED; prot = PROT_READ; Loading