vbox的更動 51870 路徑 trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp
- 時間撮記:
- 2014-7-4 下午02:19:18 (10 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp
r51868 r51870 2170 2170 #endif 2171 2171 uint8_t const *pbHashTab = pAttrib->u.pPageHashes->RawData.Asn1Core.uData.pu8; 2172 for (uint32_t iPage = 0; iPage < cPages ; iPage++)2172 for (uint32_t iPage = 0; iPage < cPages - 1; iPage++) 2173 2173 { 2174 2174 /* Decode the page offset. */ 2175 2175 uint32_t const offPageInFile = RT_MAKE_U32_FROM_U8(pbHashTab[0], pbHashTab[1], pbHashTab[2], pbHashTab[3]); 2176 if (offPageInFile >= SpecialPlaces.cbToHash) 2177 { 2178 /* The last entry is zero. */ 2179 if ( offPageInFile == SpecialPlaces.cbToHash 2180 && iPage + 1 == cPages 2181 && ASMMemIsAll8(pbHashTab + 4, cbHash, 0) == NULL) 2182 return VINF_SUCCESS; 2176 if (RT_UNLIKELY(offPageInFile >= SpecialPlaces.cbToHash)) 2183 2177 return RTErrInfoSetF(pErrInfo, VERR_LDRVI_PAGE_HASH_TAB_TOO_LONG, 2184 2178 "Page hash entry #%u is beyond the signature table start: %#x, %#x", 2185 2179 iPage, offPageInFile, SpecialPlaces.cbToHash); 2186 } 2187 if (offPageInFile < offPrev) 2180 if (RT_UNLIKELY(offPageInFile < offPrev)) 2188 2181 return RTErrInfoSetF(pErrInfo, VERR_LDRVI_PAGE_HASH_TAB_NOT_STRICTLY_SORTED, 2189 2182 "Page hash table is not strictly sorted: entry #%u @%#x, previous @%#x\n", … … 2327 2320 } 2328 2321 2322 /* 2323 * Check that the last table entry has a hash value of zero. 2324 */ 2325 if (ASMMemIsAll8(pbHashTab + 4, cbHash, 0) != NULL) 2326 return RTErrInfoSetF(pErrInfo, VERR_LDRVI_PAGE_HASH_TAB_TOO_LONG, 2327 "Maltform final page hash table entry: #%u %#010x %.*Rhxs", 2328 cPages - 1, RT_MAKE_U32_FROM_U8(pbHashTab[0], pbHashTab[1], pbHashTab[2], pbHashTab[3]), 2329 (size_t)cbHash, pbHashTab + 4); 2329 2330 return VINF_SUCCESS; 2330 2331 }
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器