Changeset 95335 in vbox for trunk/src/VBox/HostServices
- Timestamp:
- Jun 21, 2022 7:55:01 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/GuestProperties/VBoxGuestPropSvc.cpp
r95332 r95335 58 58 #include <VBox/vmm/dbgf.h> 59 59 #include <VBox/version.h> 60 #include <VBox/AssertGuest.h> 60 61 61 62 #include <list> … … 960 961 { 961 962 for (unsigned i = 0; i < cbPatterns - 1; ++i) 963 { 964 char ch = pchPatterns[i]; 962 965 if (pchPatterns[i] != '\0') 963 szPatterns[i] = pchPatterns[i];966 { /* likely*/ } 964 967 else 965 szPatterns[i] = '|'; 968 { 969 /* Since the RTStrValidateEncodingEx call in HGCMSvcGetCStr stops at the 970 first terminator, we have to validate all subsequent pattern strings. */ 971 rc = RTStrValidateEncodingEx(&pchPatterns[i + 1], cbPatterns - i -1, RTSTR_VALIDATE_ENCODING_ZERO_TERMINATED); 972 ASSERT_GUEST_RC_BREAK(rc); 973 ch = '|'; 974 } 975 szPatterns[i] = ch; 976 } 966 977 szPatterns[cbPatterns - 1] = '\0'; 967 978 }
Note:
See TracChangeset
for help on using the changeset viewer.