diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:47:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:47:04 +0000 |
commit | 8b152439beb81c8da1bdb00c7870e2d9e8d49612 (patch) | |
tree | ea7e527f7531053d0bcc60ce1eea46e1c4b15757 /src/VBox/HostDrivers/VBoxNetFlt | |
parent | Adding debian version 7.0.16-dfsg-8. (diff) | |
download | virtualbox-8b152439beb81c8da1bdb00c7870e2d9e8d49612.tar.xz virtualbox-8b152439beb81c8da1bdb00c7870e2d9e8d49612.zip |
Merging upstream version 7.0.18-dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/VBox/HostDrivers/VBoxNetFlt')
-rw-r--r-- | src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltRt-win.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltRt-win.cpp b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltRt-win.cpp index 5913697b..d6ed6bb1 100644 --- a/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltRt-win.cpp +++ b/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltRt-win.cpp @@ -1134,17 +1134,16 @@ DECLHIDDEN(void) vboxNetFltWinQuFiniPacketQueue(PVBOXNETFLTINS pInstance) */ DECLHIDDEN(NDIS_STATUS) vboxNetFltWinAllocSG(UINT cbPacket, PINTNETSG *ppSG) { - NDIS_STATUS Status; - PINTNETSG pSG; - /* allocation: * 1. SG_PACKET - with one aSegs pointing to * 2. buffer of cbPacket containing the entire packet */ AssertCompileSizeAlignment(INTNETSG, sizeof(PVOID)); - Status = vboxNetFltWinMemAlloc((PVOID*)&pSG, cbPacket + RT_UOFFSETOF_DYN(INTNETSG, aSegs[1])); + PINTNETSG pSG = NULL; + UINT const cbSg = RT_UOFFSETOF_DYN(INTNETSG, aSegs[1]); + NDIS_STATUS Status = vboxNetFltWinMemAlloc((PVOID *)&pSG, cbSg + cbPacket); if (Status == NDIS_STATUS_SUCCESS) { - IntNetSgInitTemp(pSG, pSG + 1, cbPacket); + IntNetSgInitTemp(pSG, (uint8_t *)pSG + cbSg, cbPacket); LogFlow(("pSG created (%p)\n", pSG)); *ppSG = pSG; } |