Changeset 40091 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Feb 13, 2012 10:14:00 AM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 76231
- Location:
- trunk/src/VBox/Runtime/common/string
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/utf-16.cpp
r40073 r40091 255 255 AssertReturn(chReplacement && (unsigned)chReplacement < 128, -1); 256 256 /* Validate the encoding. */ 257 if (RT_FAILURE(RTUtf16CalcUtf8LenEx(pwsz, RTSTR_MAX, NULL)))258 return -1;259 257 for (;;) 260 258 { … … 262 260 PCRTUNICP pCp; 263 261 PRTUTF16 pwszOld = pwsz; 264 RTUtf16GetCpEx((PCRTUTF16 *)&pwsz, &Cp); 262 if (RT_FAILURE(RTUtf16GetCpEx((PCRTUTF16 *)&pwsz, &Cp))) 263 return -1; 265 264 if (!Cp) 266 265 break; -
trunk/src/VBox/Runtime/common/string/utf-8.cpp
r40073 r40091 356 356 size_t cReplacements = 0; 357 357 AssertReturn(chReplacement && (unsigned)chReplacement < 128, -1); 358 if (RT_FAILURE(RTStrValidateEncoding(psz)))359 return -1;360 358 for (;;) 361 359 { … … 363 361 PCRTUNICP pCp; 364 362 char *pszOld = psz; 365 RTStrGetCpEx((const char **)&psz, &Cp); 363 if (RT_FAILURE(RTStrGetCpEx((const char **)&psz, &Cp))) 364 return -1; 366 365 if (!Cp) 367 366 break;
Note:
See TracChangeset
for help on using the changeset viewer.