Changeset 76785 in vbox for trunk/src/VBox/HostDrivers
- Timestamp:
- Jan 11, 2019 5:35:01 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 128117
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
r76553 r76785 1572 1572 if (RT_SUCCESS(rc)) 1573 1573 { 1574 PSUPDRVNTERRORINFO pCur; 1574 PSUPDRVNTERRORINFO pMatch = NULL; 1575 PSUPDRVNTERRORINFO pCur; 1575 1576 RTListForEach(&g_ErrorInfoHead, pCur, SUPDRVNTERRORINFO, ListEntry) 1576 1577 { 1577 1578 if ( pCur->hProcessId == hCurProcessId 1578 1579 && pCur->hThreadId == hCurThreadId) 1580 { 1581 pMatch = pCur; 1579 1582 break; 1583 } 1580 1584 } 1581 1585 … … 1584 1588 * If so, check the destination buffer and copy the data into it. 1585 1589 */ 1586 if ( p Cur1587 && pStack->Parameters.Read.ByteOffset.QuadPart < p Cur->cchErrorInfo1590 if ( pMatch 1591 && pStack->Parameters.Read.ByteOffset.QuadPart < pMatch->cchErrorInfo 1588 1592 && pStack->Parameters.Read.ByteOffset.QuadPart >= 0) 1589 1593 { … … 1592 1596 { 1593 1597 uint32_t offRead = (uint32_t)pStack->Parameters.Read.ByteOffset.QuadPart; 1594 uint32_t cbToRead = p Cur->cchErrorInfo - offRead;1598 uint32_t cbToRead = pMatch->cchErrorInfo - offRead; 1595 1599 if (cbToRead < pStack->Parameters.Read.Length) 1596 1600 RT_BZERO((uint8_t *)pvDstBuf + cbToRead, pStack->Parameters.Read.Length - cbToRead); 1597 1601 else 1598 1602 cbToRead = pStack->Parameters.Read.Length; 1599 memcpy(pvDstBuf, &p Cur->szErrorInfo[offRead], cbToRead);1603 memcpy(pvDstBuf, &pMatch->szErrorInfo[offRead], cbToRead); 1600 1604 pIrp->IoStatus.Information = cbToRead; 1601 1605 … … 1608 1612 * End of file. Free the info. 1609 1613 */ 1610 else if (p Cur)1614 else if (pMatch) 1611 1615 { 1612 RTListNodeRemove(&p Cur->ListEntry);1613 RTMemFree(p Cur);1616 RTListNodeRemove(&pMatch->ListEntry); 1617 RTMemFree(pMatch); 1614 1618 rcNt = STATUS_END_OF_FILE; 1615 1619 }
Note:
See TracChangeset
for help on using the changeset viewer.