summaryrefslogtreecommitdiff
path: root/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
diff options
context:
space:
mode:
authorMichael Meskes <meskes@debian.org>2009-11-19 17:48:11 +0100
committerMichael Meskes <meskes@debian.org>2009-11-19 17:48:11 +0100
commitfd892711c6bdc0ef96b6b3ea13b668cb2a38196e (patch)
treee6ec126da2bcd6a490d5661118630edf983580ec /src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
parent8dc3a7e38d0783262b1aa8c3462e7359d8996d98 (diff)
parentb35715c68a1bec309bc1990353e35c20a21d5c47 (diff)
downloadvirtualbox-debian/3.0.10-dfsg-2bpo50+1.tar.gz
Merge branch 'master' into lennydebian/3.0.10-dfsg-2bpo50+1
Conflicts: debian/changelog
Diffstat (limited to 'src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp')
-rw-r--r--src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp b/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
index 53ee7fe0f..79705ad28 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
@@ -774,6 +774,13 @@ static int VBoxGuestCommonIOCtl_VMMRequest(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTS
cbData, cbReq, enmType));
return VERR_INVALID_PARAMETER;
}
+ int rc = VbglGRVerify(pReqHdr, cbData);
+ if (RT_FAILURE(rc))
+ {
+ Log(("VBoxGuestCommonIOCtl: VMMREQUEST: invalid header: size %#x, expected >= %#x (hdr); type=%#x; rc %d!!\n",
+ cbData, cbReq, enmType, rc));
+ return rc;
+ }
/*
* Make a copy of the request in the physical memory heap so
@@ -783,7 +790,7 @@ static int VBoxGuestCommonIOCtl_VMMRequest(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTS
* it does makes things a bit simpler wrt to phys address.)
*/
VMMDevRequestHeader *pReqCopy;
- int rc = VbglGRAlloc(&pReqCopy, cbReq, enmType);
+ rc = VbglGRAlloc(&pReqCopy, cbReq, enmType);
if (RT_FAILURE(rc))
{
Log(("VBoxGuestCommonIOCtl: VMMREQUEST: failed to allocate %u (%#x) bytes to cache the request. rc=%d!!\n",