Changeset 70086 in vbox for trunk/src/VBox/HostServices/GuestProperties
- Timestamp:
- Dec 12, 2017 5:36:51 PM (7 years ago)
- Location:
- trunk/src/VBox/HostServices/GuestProperties
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/GuestProperties/service.cpp
r70063 r70086 619 619 { 620 620 char szFlags[GUEST_PROP_MAX_FLAGS_LEN]; 621 rc = GuestPropWriteFlags(pProp->mFlags, szFlags );621 rc = GuestPropWriteFlags(pProp->mFlags, szFlags, sizeof(szFlags)); 622 622 if (RT_SUCCESS(rc)) 623 623 { … … 857 857 858 858 char szFlags[GUEST_PROP_MAX_FLAGS_LEN]; 859 int rc = GuestPropWriteFlags(pProp->mFlags, szFlags );859 int rc = GuestPropWriteFlags(pProp->mFlags, szFlags, sizeof(szFlags)); 860 860 if (RT_FAILURE(rc)) 861 861 return rc; … … 1016 1016 { 1017 1017 char szFlags[GUEST_PROP_MAX_FLAGS_LEN]; 1018 rc = GuestPropWriteFlags(prop.mFlags, szFlags );1018 rc = GuestPropWriteFlags(prop.mFlags, szFlags, sizeof(szFlags)); 1019 1019 if (RT_SUCCESS(rc)) 1020 1020 { … … 1215 1215 /* Send out a host notification */ 1216 1216 const char *pszValue = prop.mValue.c_str(); 1217 rc = GuestPropWriteFlags(prop.mFlags, szFlags );1217 rc = GuestPropWriteFlags(prop.mFlags, szFlags, sizeof(szFlags)); 1218 1218 if (RT_SUCCESS(rc)) 1219 1219 rc = notifyHost(pszProperty, pszValue, u64Timestamp, szFlags); … … 1406 1406 1407 1407 char szFlags[GUEST_PROP_MAX_FLAGS_LEN]; 1408 int rc = GuestPropWriteFlags(pProp->mFlags, szFlags );1408 int rc = GuestPropWriteFlags(pProp->mFlags, szFlags, sizeof(szFlags)); 1409 1409 if (RT_FAILURE(rc)) 1410 1410 RTStrPrintf(szFlags, sizeof(szFlags), "???"); -
trunk/src/VBox/HostServices/GuestProperties/testcase/tstGuestPropSvc.cpp
r70063 r70086 120 120 if (RT_SUCCESS(rc)) 121 121 { 122 rc = GuestPropWriteFlags(fFlags, pszFlagBuffer );122 rc = GuestPropWriteFlags(fFlags, pszFlagBuffer, GUEST_PROP_MAX_FLAGS_LEN); 123 123 if (RT_FAILURE(rc)) 124 124 RTTestIFailed("Failed to convert flag string '%s' back to a string.", … … 159 159 RTTestISub("Rejection of an invalid flags field"); 160 160 /* This is required to fail. */ 161 if (RT_SUCCESS(GuestPropWriteFlags(u32BadFlags, pszFlagBuffer )))161 if (RT_SUCCESS(GuestPropWriteFlags(u32BadFlags, pszFlagBuffer, GUEST_PROP_MAX_FLAGS_LEN))) 162 162 { 163 163 RTTestIFailed("Flags 0x%x were incorrectly written out as '%.*s'\n", … … 828 828 { 829 829 char szFlags[GUEST_PROP_MAX_FLAGS_LEN]; 830 if (RT_FAILURE(GuestPropWriteFlags(fFlags, szFlags )))830 if (RT_FAILURE(GuestPropWriteFlags(fFlags, szFlags, sizeof(szFlags)))) 831 831 RTTestIFailed("Failed to set the global flags."); 832 832 else
Note:
See TracChangeset
for help on using the changeset viewer.