Changeset 78053 in vbox for trunk/src/VBox
- Timestamp:
- Apr 9, 2019 10:16:54 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/misc/uri.cpp
r76553 r78053 880 880 * and get it slightly wrong here). 881 881 */ 882 RTPATHPARSED ParsedPath; 883 int rc = RTPathParse(pszPath, &ParsedPath, sizeof(ParsedPath), fPathStyle); 882 union 883 { 884 RTPATHPARSED ParsedPath; 885 uint8_t abPadding[sizeof(RTPATHPARSED)]; 886 } u; 887 int rc = RTPathParse(pszPath, &u.ParsedPath, sizeof(u.ParsedPath), fPathStyle); 884 888 if (RT_SUCCESS(rc) || rc == VERR_BUFFER_OVERFLOW) 885 889 { 886 890 /* Skip leading slashes. */ 887 if ( ParsedPath.fProps & RTPATH_PROP_ROOT_SLASH)891 if (u.ParsedPath.fProps & RTPATH_PROP_ROOT_SLASH) 888 892 { 889 893 if (fPathStyle == RTPATH_STR_F_STYLE_DOS) … … 900 904 */ 901 905 static const char s_szPrefix[] = "file:///"; 902 size_t const cchPrefix = sizeof(s_szPrefix) - ( ParsedPath.fProps & RTPATH_PROP_UNC ? 2 : 1);906 size_t const cchPrefix = sizeof(s_szPrefix) - (u.ParsedPath.fProps & RTPATH_PROP_UNC ? 2 : 1); 903 907 size_t cchEncoded = rtUriCalcEncodedLength(pszPath, cchPath, fPathStyle != RTPATH_STR_F_STYLE_DOS); 904 908
Note:
See TracChangeset
for help on using the changeset viewer.