From b4e437000a37176ecc82fc994687b6eab04a49c1 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Mon, 18 Dec 2017 11:22:03 +0100 Subject: [PATCH] virtualbox5: prevent null-pointer dereference Fix #2612 --- repos/ports/ports/virtualbox5.hash | 2 +- repos/ports/src/virtualbox5/patches/series | 1 + repos/ports/src/virtualbox5/patches/vusburb.patch | 13 +++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 repos/ports/src/virtualbox5/patches/vusburb.patch diff --git a/repos/ports/ports/virtualbox5.hash b/repos/ports/ports/virtualbox5.hash index b17ce94cec..2f6645fd92 100644 --- a/repos/ports/ports/virtualbox5.hash +++ b/repos/ports/ports/virtualbox5.hash @@ -1 +1 @@ -25d9be4a067a1c748bab7a60220d7477e552957a +585d9e845521cbdc189dbc37f7639b9d3428c125 diff --git a/repos/ports/src/virtualbox5/patches/series b/repos/ports/src/virtualbox5/patches/series index 2d36df2813..b559af1b29 100644 --- a/repos/ports/src/virtualbox5/patches/series +++ b/repos/ports/src/virtualbox5/patches/series @@ -10,3 +10,4 @@ tm_tpr_vbox5.patch vm.patch mm.patch substr.patch +vusburb.patch diff --git a/repos/ports/src/virtualbox5/patches/vusburb.patch b/repos/ports/src/virtualbox5/patches/vusburb.patch new file mode 100644 index 0000000000..7e50bcbc76 --- /dev/null +++ b/repos/ports/src/virtualbox5/patches/vusburb.patch @@ -0,0 +1,13 @@ +diff --git a/src/app/virtualbox/src/VBox/Devices/USB/VUSBUrb.cpp b/src/app/virtualbox/src/VBox/Devices/USB/VUSBUrb.cpp +index 86ed754..250f0ad 100644 +--- a/src/app/virtualbox/src/VBox/Devices/USB/VUSBUrb.cpp ++++ b/src/app/virtualbox/src/VBox/Devices/USB/VUSBUrb.cpp +@@ -1271,7 +1271,7 @@ void vusbUrbDoReapAsync(PRTLISTANCHOR pUrbLst, RTMSINTERVAL cMillies) + && ((pRipe = pDev->pUsbIns->pReg->pfnUrbReap(pDev->pUsbIns, cMillies)) != NULL)) + { + vusbUrbAssert(pRipe); +- if (pRipe == pVUsbUrbNext->pUrb) ++ if (pVUsbUrbNext && pRipe == pVUsbUrbNext->pUrb) + pVUsbUrbNext = RTListGetNext(pUrbLst, pVUsbUrb, VUSBURBVUSBINT, NdLst); + vusbUrbRipe(pRipe); + }