- Timestamp:
- May 7, 2012 4:52:45 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp
r40683 r41192 177 177 uint32_t *pcMsTimeLimit) 178 178 { 179 AssertPtrReturn(puContext, VERR_INVALID_PARAMETER); 180 AssertPtrReturn(pszCmd, VERR_INVALID_PARAMETER); 181 AssertPtrReturn(puFlags, VERR_INVALID_PARAMETER); 182 AssertPtrReturn(pszArgs, VERR_INVALID_PARAMETER); 183 AssertPtrReturn(pcArgs, VERR_INVALID_PARAMETER); 184 AssertPtrReturn(pszEnv, VERR_INVALID_PARAMETER); 185 AssertPtrReturn(pcbEnv, VERR_INVALID_PARAMETER); 186 AssertPtrReturn(pcEnvVars, VERR_INVALID_PARAMETER); 187 AssertPtrReturn(pszUser, VERR_INVALID_PARAMETER); 188 AssertPtrReturn(pszPassword, VERR_INVALID_PARAMETER); 189 AssertPtrReturn(pcMsTimeLimit, VERR_INVALID_PARAMETER); 179 AssertReturn(cParms == 11, VERR_INVALID_PARAMETER); 180 181 AssertPtrReturn(puContext, VERR_INVALID_POINTER); 182 AssertPtrReturn(pszCmd, VERR_INVALID_POINTER); 183 AssertPtrReturn(puFlags, VERR_INVALID_POINTER); 184 AssertPtrReturn(pszArgs, VERR_INVALID_POINTER); 185 AssertPtrReturn(pcArgs, VERR_INVALID_POINTER); 186 AssertPtrReturn(pszEnv, VERR_INVALID_POINTER); 187 AssertPtrReturn(pcbEnv, VERR_INVALID_POINTER); 188 AssertPtrReturn(pcEnvVars, VERR_INVALID_POINTER); 189 AssertPtrReturn(pszUser, VERR_INVALID_POINTER); 190 AssertPtrReturn(pszPassword, VERR_INVALID_POINTER); 191 AssertPtrReturn(pcMsTimeLimit, VERR_INVALID_POINTER); 190 192 191 193 VBoxGuestCtrlHGCMMsgExecCmd Msg; … … 194 196 Msg.hdr.u32ClientID = u32ClientId; 195 197 Msg.hdr.u32Function = GUEST_GET_HOST_MSG; 196 Msg.hdr.cParms = cParms; /** @todo r=bird: This isn't safe/right. The parameter count of this HGCM call 197 * is fixed from our point of view. */ 198 Msg.hdr.cParms = 11; 198 199 199 200 VbglHGCMParmUInt32Set(&Msg.context, 0); … … 245 246 uint32_t *puHandle, uint32_t *puFlags) 246 247 { 247 AssertPtrReturn(puContext, VERR_INVALID_PARAMETER); 248 AssertPtrReturn(puPID, VERR_INVALID_PARAMETER); 249 AssertPtrReturn(puHandle, VERR_INVALID_PARAMETER); 250 AssertPtrReturn(puFlags, VERR_INVALID_PARAMETER); 248 AssertReturn(cParms == 4, VERR_INVALID_PARAMETER); 249 250 AssertPtrReturn(puContext, VERR_INVALID_POINTER); 251 AssertPtrReturn(puPID, VERR_INVALID_POINTER); 252 AssertPtrReturn(puHandle, VERR_INVALID_POINTER); 253 AssertPtrReturn(puFlags, VERR_INVALID_POINTER); 251 254 252 255 VBoxGuestCtrlHGCMMsgExecOut Msg; … … 255 258 Msg.hdr.u32ClientID = u32ClientId; 256 259 Msg.hdr.u32Function = GUEST_GET_HOST_MSG; 257 Msg.hdr.cParms = cParms;260 Msg.hdr.cParms = 4; 258 261 259 262 VbglHGCMParmUInt32Set(&Msg.context, 0); … … 299 302 uint32_t *pcbSize) 300 303 { 301 AssertPtrReturn(puContext, VERR_INVALID_PARAMETER); 302 AssertPtrReturn(puPID, VERR_INVALID_PARAMETER); 303 AssertPtrReturn(puFlags, VERR_INVALID_PARAMETER); 304 AssertPtrReturn(pvData, VERR_INVALID_PARAMETER); 305 AssertPtrReturn(pcbSize, VERR_INVALID_PARAMETER); 304 AssertReturn(cParms == 5, VERR_INVALID_PARAMETER); 305 306 AssertPtrReturn(puContext, VERR_INVALID_POINTER); 307 AssertPtrReturn(puPID, VERR_INVALID_POINTER); 308 AssertPtrReturn(puFlags, VERR_INVALID_POINTER); 309 AssertPtrReturn(pvData, VERR_INVALID_POINTER); 310 AssertPtrReturn(pcbSize, VERR_INVALID_POINTER); 306 311 307 312 VBoxGuestCtrlHGCMMsgExecIn Msg; … … 310 315 Msg.hdr.u32ClientID = u32ClientId; 311 316 Msg.hdr.u32Function = GUEST_GET_HOST_MSG; 312 Msg.hdr.cParms = cParms;317 Msg.hdr.cParms = 5; 313 318 314 319 VbglHGCMParmUInt32Set(&Msg.context, 0); … … 449 454 return rc; 450 455 } 456
Note:
See TracChangeset
for help on using the changeset viewer.