• Home
  • Raw
  • Download

Lines Matching refs:pHeader

71     const DexHeader*  pHeader;  member
240 static bool swapDexHeader(const CheckState* state, DexHeader* pHeader) in swapDexHeader() argument
242 CHECK_PTR_RANGE(pHeader, pHeader + 1); in swapDexHeader()
245 SWAP_FIELD4(pHeader->checksum); in swapDexHeader()
247 SWAP_FIELD4(pHeader->fileSize); in swapDexHeader()
248 SWAP_FIELD4(pHeader->headerSize); in swapDexHeader()
249 SWAP_FIELD4(pHeader->endianTag); in swapDexHeader()
250 SWAP_FIELD4(pHeader->linkSize); in swapDexHeader()
251 SWAP_OFFSET4(pHeader->linkOff); in swapDexHeader()
252 SWAP_OFFSET4(pHeader->mapOff); in swapDexHeader()
253 SWAP_FIELD4(pHeader->stringIdsSize); in swapDexHeader()
254 SWAP_OFFSET4(pHeader->stringIdsOff); in swapDexHeader()
255 SWAP_FIELD4(pHeader->typeIdsSize); in swapDexHeader()
256 SWAP_OFFSET4(pHeader->typeIdsOff); in swapDexHeader()
257 SWAP_FIELD4(pHeader->fieldIdsSize); in swapDexHeader()
258 SWAP_OFFSET4(pHeader->fieldIdsOff); in swapDexHeader()
259 SWAP_FIELD4(pHeader->methodIdsSize); in swapDexHeader()
260 SWAP_OFFSET4(pHeader->methodIdsOff); in swapDexHeader()
261 SWAP_FIELD4(pHeader->protoIdsSize); in swapDexHeader()
262 SWAP_OFFSET4(pHeader->protoIdsOff); in swapDexHeader()
263 SWAP_FIELD4(pHeader->classDefsSize); in swapDexHeader()
264 SWAP_OFFSET4(pHeader->classDefsOff); in swapDexHeader()
265 SWAP_FIELD4(pHeader->dataSize); in swapDexHeader()
266 SWAP_OFFSET4(pHeader->dataOff); in swapDexHeader()
268 if (pHeader->endianTag != kDexEndianConstant) { in swapDexHeader()
269 LOGE("Unexpected endian_tag: 0x%x\n", pHeader->endianTag); in swapDexHeader()
274 u4 linkOff = pHeader->linkOff; in swapDexHeader()
275 u4 linkEnd = linkOff + pHeader->linkSize; in swapDexHeader()
276 u4 dataOff = pHeader->dataOff; in swapDexHeader()
277 u4 dataEnd = dataOff + pHeader->dataSize; in swapDexHeader()
302 const DexHeader* pHeader = filePointer(state, 0); in checkHeaderSection() local
303 *endOffset = pHeader->headerSize; in checkHeaderSection()
367 u4 dataItemsLeft = state->pHeader->dataSize; // See use below. in swapMap()
388 if (item->offset >= state->pHeader->fileSize) { in swapMap()
390 item->offset, state->pHeader->fileSize); in swapMap()
439 && ((state->pHeader->stringIdsOff != 0) in swapMap()
440 || (state->pHeader->stringIdsSize != 0))) { in swapMap()
446 && ((state->pHeader->typeIdsOff != 0) in swapMap()
447 || (state->pHeader->typeIdsSize != 0))) { in swapMap()
453 && ((state->pHeader->protoIdsOff != 0) in swapMap()
454 || (state->pHeader->protoIdsSize != 0))) { in swapMap()
460 && ((state->pHeader->fieldIdsOff != 0) in swapMap()
461 || (state->pHeader->fieldIdsSize != 0))) { in swapMap()
467 && ((state->pHeader->methodIdsOff != 0) in swapMap()
468 || (state->pHeader->methodIdsSize != 0))) { in swapMap()
474 && ((state->pHeader->classDefsOff != 0) in swapMap()
475 || (state->pHeader->classDefsSize != 0))) { in swapMap()
497 if (sectionOffset != state->pHeader->mapOff) { in checkMapSection()
499 sectionOffset, state->pHeader->mapOff); in checkMapSection()
548 SWAP_INDEX4(item->descriptorIdx, state->pHeader->stringIdsSize); in swapTypeIdItem()
582 SWAP_INDEX4(item->shortyIdx, state->pHeader->stringIdsSize); in swapProtoIdItem()
583 SWAP_INDEX4(item->returnTypeIdx, state->pHeader->typeIdsSize); in swapProtoIdItem()
732 SWAP_INDEX2(item->classIdx, state->pHeader->typeIdsSize); in swapFieldIdItem()
733 SWAP_INDEX2(item->typeIdx, state->pHeader->typeIdsSize); in swapFieldIdItem()
734 SWAP_INDEX4(item->nameIdx, state->pHeader->stringIdsSize); in swapFieldIdItem()
804 SWAP_INDEX2(item->classIdx, state->pHeader->typeIdsSize); in swapMethodIdItem()
805 SWAP_INDEX2(item->protoIdx, state->pHeader->protoIdsSize); in swapMethodIdItem()
806 SWAP_INDEX4(item->nameIdx, state->pHeader->stringIdsSize); in swapMethodIdItem()
870 SWAP_INDEX4(item->classIdx, state->pHeader->typeIdsSize); in swapClassDefItem()
872 SWAP_INDEX4_OR_NOINDEX(item->superclassIdx, state->pHeader->typeIdsSize); in swapClassDefItem()
874 SWAP_INDEX4_OR_NOINDEX(item->sourceFileIdx, state->pHeader->stringIdsSize); in swapClassDefItem()
1028 SWAP_INDEX4(item->fieldIdx, state->pHeader->fieldIdsSize); in swapFieldAnnotations()
1057 SWAP_INDEX4(item->methodIdx, state->pHeader->methodIdsSize); in swapMethodAnnotations()
1087 SWAP_INDEX4(item->methodIdx, state->pHeader->methodIdsSize); in swapParameterAnnotations()
1289 SWAP_INDEX2(pType->typeIdx, state->pHeader->typeIdsSize); in swapTypeList()
1405 CHECK_INDEX(field->fieldIdx, state->pHeader->fieldIdsSize); in verifyFields()
1429 CHECK_INDEX(method->methodIdx, state->pHeader->methodIdsSize); in verifyMethods()
1647 CHECK_INDEX(typeIdx, state->pHeader->typeIdsSize); in setHandlerOffsAndVerify()
1937 CHECK_INDEX(parameterName, state->pHeader->stringIdsSize); in intraVerifyDebugInfoItem()
1970 CHECK_INDEX(idx, state->pHeader->stringIdsSize); in intraVerifyDebugInfoItem()
1976 CHECK_INDEX(idx, state->pHeader->stringIdsSize); in intraVerifyDebugInfoItem()
2002 CHECK_INDEX(idx, state->pHeader->stringIdsSize); in intraVerifyDebugInfoItem()
2008 CHECK_INDEX(idx, state->pHeader->stringIdsSize); in intraVerifyDebugInfoItem()
2014 CHECK_INDEX(idx, state->pHeader->stringIdsSize); in intraVerifyDebugInfoItem()
2023 CHECK_INDEX(idx, state->pHeader->stringIdsSize); in intraVerifyDebugInfoItem()
2135 CHECK_INDEX(idx, state->pHeader->stringIdsSize); in verifyEncodedValue()
2144 CHECK_INDEX(idx, state->pHeader->typeIdsSize); in verifyEncodedValue()
2154 CHECK_INDEX(idx, state->pHeader->fieldIdsSize); in verifyEncodedValue()
2163 CHECK_INDEX(idx, state->pHeader->methodIdsSize); in verifyEncodedValue()
2220 CHECK_INDEX(idx, state->pHeader->typeIdsSize); in verifyEncodedAnnotation()
2247 CHECK_INDEX(idx, state->pHeader->stringIdsSize); in verifyEncodedAnnotation()
2419 u4 dataStart = state->pHeader->dataOff; in iterateDataSection()
2420 u4 dataEnd = dataStart + state->pHeader->dataSize; in iterateDataSection()
2498 sectionCount, state->pHeader->stringIdsOff, in swapEverythingButHeaderAndMap()
2499 state->pHeader->stringIdsSize, swapStringIdItem, in swapEverythingButHeaderAndMap()
2505 sectionCount, state->pHeader->typeIdsOff, in swapEverythingButHeaderAndMap()
2506 state->pHeader->typeIdsSize, swapTypeIdItem, in swapEverythingButHeaderAndMap()
2512 sectionCount, state->pHeader->protoIdsOff, in swapEverythingButHeaderAndMap()
2513 state->pHeader->protoIdsSize, swapProtoIdItem, in swapEverythingButHeaderAndMap()
2519 sectionCount, state->pHeader->fieldIdsOff, in swapEverythingButHeaderAndMap()
2520 state->pHeader->fieldIdsSize, swapFieldIdItem, in swapEverythingButHeaderAndMap()
2526 sectionCount, state->pHeader->methodIdsOff, in swapEverythingButHeaderAndMap()
2527 state->pHeader->methodIdsSize, swapMethodIdItem, in swapEverythingButHeaderAndMap()
2533 sectionCount, state->pHeader->classDefsOff, in swapEverythingButHeaderAndMap()
2534 state->pHeader->classDefsSize, swapClassDefItem, in swapEverythingButHeaderAndMap()
2725 DexHeader* pHeader; in dexFixByteOrdering() local
2736 pHeader = (DexHeader*) addr; in dexFixByteOrdering()
2737 if (memcmp(pHeader->magic, DEX_MAGIC, 4) != 0) { in dexFixByteOrdering()
2741 pHeader->magic[0], pHeader->magic[1], in dexFixByteOrdering()
2742 pHeader->magic[2], pHeader->magic[3]); in dexFixByteOrdering()
2746 if (okay && memcmp(pHeader->magic+4, DEX_MAGIC_VERS, 4) != 0) { in dexFixByteOrdering()
2750 pHeader->magic[4], pHeader->magic[5], in dexFixByteOrdering()
2751 pHeader->magic[6], pHeader->magic[7]); in dexFixByteOrdering()
2756 int expectedLen = (int) SWAP4(pHeader->fileSize); in dexFixByteOrdering()
2778 const int nonSum = sizeof(pHeader->magic) + sizeof(pHeader->checksum); in dexFixByteOrdering()
2779 u4 storedFileSize = SWAP4(pHeader->fileSize); in dexFixByteOrdering()
2780 u4 expectedChecksum = SWAP4(pHeader->checksum); in dexFixByteOrdering()
2782 adler = adler32(adler, ((const u1*) pHeader) + nonSum, in dexFixByteOrdering()
2803 okay = swapDexHeader(&state, pHeader); in dexFixByteOrdering()
2807 state.pHeader = pHeader; in dexFixByteOrdering()
2809 if (pHeader->headerSize < sizeof(DexHeader)) { in dexFixByteOrdering()
2811 pHeader->headerSize, (int) sizeof(DexHeader)); in dexFixByteOrdering()
2813 } else if (pHeader->headerSize > sizeof(DexHeader)) { in dexFixByteOrdering()
2815 pHeader->headerSize, (int) sizeof(DexHeader)); in dexFixByteOrdering()
2825 if (pHeader->mapOff != 0) { in dexFixByteOrdering()
2827 DexMapList* pDexMap = (DexMapList*) (addr + pHeader->mapOff); in dexFixByteOrdering()