Changeset 59232 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Dec 31, 2015 12:32:09 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/dbg/dbgmodcodeview.cpp
r59231 r59232 915 915 /* Check the header. */ 916 916 PCRTCVSRCMODULE pHdr = (PCRTCVSRCMODULE)pvSubSect; 917 AssertReturn(cbSubSect >= RT_ OFFSETOF(RTCVSRCMODULE, aoffSrcFiles), VERR_CV_BAD_FORMAT);917 AssertReturn(cbSubSect >= RT_UOFFSETOF(RTCVSRCMODULE, aoffSrcFiles), VERR_CV_BAD_FORMAT); 918 918 size_t cbHdr = sizeof(RTCVSRCMODULE) 919 919 + pHdr->cFiles * sizeof(uint32_t) … … 938 938 { 939 939 uint32_t const offSrcFile = pHdr->aoffSrcFiles[i]; 940 RTDBGMODCV_CHECK_RET_BF(cbSubSect - RT_ OFFSETOF(RTCVSRCFILE, aoffSrcLines) >= offSrcFile,940 RTDBGMODCV_CHECK_RET_BF(cbSubSect - RT_UOFFSETOF(RTCVSRCFILE, aoffSrcLines) >= offSrcFile, 941 941 ("cbSubSect=%#x (- %#x) aoffSrcFiles[%u]=%#x\n", 942 cbSubSect, RT_ OFFSETOF(RTCVSRCFILE, aoffSrcLines), i, offSrcFile));942 cbSubSect, RT_UOFFSETOF(RTCVSRCFILE, aoffSrcLines), i, offSrcFile)); 943 943 PCRTCVSRCFILE pSrcFile = (PCRTCVSRCFILE)((uint8_t const *)pvSubSect + offSrcFile); 944 size_t cbSrcFileHdr = RT_ OFFSETOF(RTCVSRCFILE, aoffSrcLines[pSrcFile->cSegs])944 size_t cbSrcFileHdr = RT_UOFFSETOF(RTCVSRCFILE, aoffSrcLines[pSrcFile->cSegs]) 945 945 + sizeof(RTCVSRCRANGE) * pSrcFile->cSegs 946 946 + sizeof(uint8_t); … … 962 962 { 963 963 uint32_t const offSrcLine = pSrcFile->aoffSrcLines[iSeg]; 964 RTDBGMODCV_CHECK_RET_BF(cbSubSect - RT_ OFFSETOF(RTCVSRCLINE, aoffLines) >= offSrcLine,964 RTDBGMODCV_CHECK_RET_BF(cbSubSect - RT_UOFFSETOF(RTCVSRCLINE, aoffLines) >= offSrcLine, 965 965 ("cbSubSect=%#x (- %#x) aoffSrcFiles[%u]=%#x\n", 966 cbSubSect, RT_ OFFSETOF(RTCVSRCLINE, aoffLines), iSeg, offSrcLine));966 cbSubSect, RT_UOFFSETOF(RTCVSRCLINE, aoffLines), iSeg, offSrcLine)); 967 967 PCRTCVSRCLINE pSrcLine = (PCRTCVSRCLINE)((uint8_t const *)pvSubSect + offSrcLine); 968 size_t cbSrcLine = RT_ OFFSETOF(RTCVSRCLINE, aoffLines[pSrcLine->cPairs])968 size_t cbSrcLine = RT_UOFFSETOF(RTCVSRCLINE, aoffLines[pSrcLine->cPairs]) 969 969 + pSrcLine->cPairs * sizeof(uint16_t); 970 970 RTDBGMODCV_CHECK_RET_BF(cbSubSect >= offSrcLine + cbSrcLine,
Note:
See TracChangeset
for help on using the changeset viewer.