Changeset 102932 in vbox
- Timestamp:
- Jan 17, 2024 4:32:10 PM (14 months ago)
- svn:sync-xref-src-repo-rev:
- 161160
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/HostServices/GuestPropertySvc.h
r98103 r102932 87 87 DECLINLINE(int) GuestPropValidateName(const char *pszName, size_t cbName) 88 88 { 89 /* Property name is expected to be at least 1 charecter long plus terminating character. */90 AssertReturn(cbName >= 2, VERR_INVALID_PARAMETER);91 AssertReturn(cbName <= GUEST_PROP_MAX_NAME_LEN, VERR_INVALID_PARAMETER);89 if ( cbName < 2 /* Property name is expected to be at least 1 charecter long plus terminating character. */ 90 || cbName > GUEST_PROP_MAX_NAME_LEN) 91 return VERR_INVALID_PARAMETER; 92 92 93 93 AssertPtrReturn(pszName, VERR_INVALID_POINTER); … … 118 118 /* Zero-length values are possible, however buffer should contain terminating character at least. */ 119 119 AssertReturn(cbValue > 0, VERR_INVALID_PARAMETER); 120 AssertReturn(cbValue <= GUEST_PROP_MAX_VALUE_LEN, VERR_TOO_MUCH_DATA); 120 121 if (cbValue > GUEST_PROP_MAX_VALUE_LEN) 122 return VERR_TOO_MUCH_DATA; 121 123 122 124 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.