- Timestamp:
- Oct 31, 2015 9:59:32 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
r58170 r58539 315 315 *ppHdr = (VBVACMDHDR *)pu8Src; 316 316 317 /* Advance data offset and sync with guest. */ 318 pVBVAData->off32Data = (pVBVAData->off32Data + cbRecord) % pVBVAData->cbData; 319 pVBVAData->guest.pVBVA->off32Data = pVBVAData->off32Data; 317 /* The data offset will be updated in vbvaReleaseCmd. */ 320 318 } 321 319 else … … 353 351 { 354 352 VBVAPARTIALRECORD *pPartialRecord = &pVBVAData->partialRecord; 355 uint8_t *au8RingBuffer = pVBVAData->guest.pu8Data;356 357 if ( (uint 8_t *)pHdr >=au8RingBuffer358 && (uint 8_t *)pHdr <&au8RingBuffer[pVBVAData->cbData])353 const uint8_t *au8RingBuffer = pVBVAData->guest.pu8Data; 354 355 if ( (uintptr_t)pHdr >= (uintptr_t)au8RingBuffer 356 && (uintptr_t)pHdr < (uintptr_t)&au8RingBuffer[pVBVAData->cbData]) 359 357 { 360 358 /* The pointer is inside ring buffer. Must be continuous chunk. */ 361 Assert(pVBVAData->cbData - ((uint8_t *)pHdr - au8RingBuffer) >= cbCmd); 362 363 /* Do nothing. */ 364 365 Assert (!pPartialRecord->pu8 && pPartialRecord->cb == 0); 359 Assert(pVBVAData->cbData - (uint32_t)((uint8_t *)pHdr - au8RingBuffer) >= cbCmd); 360 361 /* Advance data offset and sync with guest. */ 362 pVBVAData->off32Data = (pVBVAData->off32Data + cbCmd) % pVBVAData->cbData; 363 pVBVAData->guest.pVBVA->off32Data = pVBVAData->off32Data; 364 365 Assert(!pPartialRecord->pu8 && pPartialRecord->cb == 0); 366 366 } 367 367 else
Note:
See TracChangeset
for help on using the changeset viewer.