Changeset 95337 in vbox
- Timestamp:
- Jun 21, 2022 8:50:20 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 151929
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r95334 r95337 4673 4673 /* In order to pass validation, guest property value length (including '\0') in bytes 4674 4674 * should be less than GUEST_PROP_MAX_VALUE_LEN. Chop it down to an appropriate length. */ 4675 /** @todo r=bird: Should add a RTCString method for this, as this may create a 4676 * invalid UTF-8 encoding if we chop up a UTF-8 sequence. */ 4677 Assert(prop.strValue.length() + 1 > GUEST_PROP_MAX_VALUE_LEN); 4678 prop.strValue.mutableRaw()[GUEST_PROP_MAX_VALUE_LEN - 1] = '\0'; 4679 prop.strValue.jolt(); 4675 prop.strValue.truncate(GUEST_PROP_MAX_VALUE_LEN - 1 /*terminator*/); 4680 4676 } 4681 4677 else if (RT_FAILURE(rc))
Note:
See TracChangeset
for help on using the changeset viewer.