Changeset 94184 in vbox for trunk/src/VBox/Additions/common/VBoxGuest
- Timestamp:
- Mar 11, 2022 6:24:17 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestProp.cpp
r93453 r94184 937 937 * @param pcbBufActual If @a pcBuf is not large enough, the size needed. 938 938 * Optional. 939 * @param pfWasDeleted A flag which indicates that property was deleted. 940 * Optional. 939 941 */ 940 942 VBGLR3DECL(int) VbglR3GuestPropWait(HGCMCLIENTID idClient, … … 944 946 char ** ppszName, char **ppszValue, 945 947 uint64_t *pu64Timestamp, char **ppszFlags, 946 uint32_t *pcbBufActual )948 uint32_t *pcbBufActual, bool *pfWasDeleted) 947 949 { 948 950 /* … … 973 975 974 976 /* 975 * Buffer layout: Name\0Value\0Flags\0 .977 * Buffer layout: Name\0Value\0Flags\0fWasDeleted\0. 976 978 * 977 979 * If the caller cares about any of these strings, make sure things are … … 979 981 */ 980 982 if ( RT_SUCCESS(rc) 981 && (ppszName != NULL || ppszValue != NULL || ppszFlags != NULL ))983 && (ppszName != NULL || ppszValue != NULL || ppszFlags != NULL || pfWasDeleted != NULL)) 982 984 { 983 985 /* Validate / skip 'Name'. */ … … 994 996 995 997 if (ppszFlags) 998 *ppszFlags = pszFlags; 999 1000 /* Validate / skip 'Flags'. */ 1001 char *pszWasDeleted = RTStrEnd(pszFlags, cbBuf - (pszFlags - (char *)pvBuf)) + 1; 1002 AssertPtrReturn(pszWasDeleted, VERR_TOO_MUCH_DATA); 1003 if (pfWasDeleted) 996 1004 { 997 /* Validate 'Flags'. */ 998 char *pszEos = RTStrEnd(pszFlags, cbBuf - (pszFlags - (char *)pvBuf)); 999 AssertPtrReturn(pszEos, VERR_TOO_MUCH_DATA); 1000 *ppszFlags = pszFlags; 1005 AssertReturn(pszWasDeleted[0] == '0' || pszWasDeleted[0] == '1', VERR_PARSE_ERROR); 1006 *pfWasDeleted = pszWasDeleted[0] == '0' ? false : true; 1001 1007 } 1008 1009 /* Validate end of buffer string. */ 1010 char *pszEos = RTStrEnd(pszWasDeleted, cbBuf - (pszWasDeleted - (char *)pvBuf)); 1011 AssertPtrReturn(pszEos, VERR_TOO_MUCH_DATA); 1002 1012 } 1003 1013
Note:
See TracChangeset
for help on using the changeset viewer.