- Timestamp:
- Jul 10, 2012 8:37:08 AM (13 years ago)
- Location:
- trunk/src/VBox/Runtime/r3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/process-posix.cpp
r41919 r42077 151 151 size_t *pcbUser) 152 152 { 153 AssertPtrReturn(pszUser, VERR_INVALID_POINTER); 154 AssertReturn(cbUser > 0, VERR_INVALID_PARAMETER); 155 AssertPtrReturn(pcbUser, VERR_INVALID_POINTER); 153 AssertReturn( (pszUser && cbUser > 0) 154 || (!pszUser && !cbUser), VERR_INVALID_PARAMETER); 156 155 157 156 if (hProcess != RTProcSelf()) … … 172 171 size_t cbPwdUser = strlen(pPwd->pw_name) + 1; 173 172 174 *pcbUser = cbPwdUser; 173 if (pcbUser) 174 *pcbUser = cbPwdUser; 175 175 176 176 if (cbPwdUser > cbUser) -
trunk/src/VBox/Runtime/r3/win/process-win.cpp
r41919 r42077 1429 1429 size_t *pcbUser) 1430 1430 { 1431 AssertPtrReturn(pszUser, VERR_INVALID_POINTER); 1432 AssertReturn(cbUser > 0, VERR_INVALID_PARAMETER); 1433 AssertPtrReturn(pcbUser, VERR_INVALID_POINTER); 1431 AssertReturn( (pszUser && cbUser > 0) 1432 || (!pszUser && !cbUser), VERR_INVALID_PARAMETER); 1434 1433 1435 1434 if (hProcess != RTProcSelf()) … … 1448 1447 size_t cbUserName = strlen(pszUserName) + 1; 1449 1448 1450 *pcbUser = cbUserName; 1449 if (pcbUser) 1450 *pcbUser = cbUserName; 1451 1451 1452 1452 if (cbUserName > cbUser)
Note:
See TracChangeset
for help on using the changeset viewer.