@@ -1074,7 +1074,7 @@ static void parseEntityReference_pl(_CFXMLPlistParseInfo *pInfo, CFMutableDataRe
1074
1074
}
1075
1075
uint8_t tmpBuf [6 ]; // max of 6 bytes for UTF8
1076
1076
CFIndex tmpBufLength = 0 ;
1077
- CFStringGetBytes (oneChar , CFRangeMake (0 , CFStringGetLength (oneChar )), kCFStringEncodingUTF8 , 0 , NO , tmpBuf , 6 , & tmpBufLength );
1077
+ CFStringGetBytes (oneChar , CFRangeMake (0 , CFStringGetLengthUTF8 (oneChar )), kCFStringEncodingUTF8 , 0 , NO , tmpBuf , 6 , & tmpBufLength );
1078
1078
CFDataAppendBytes (stringData , tmpBuf , tmpBufLength );
1079
1079
__CFPListRelease (oneChar , pInfo -> allocator );
1080
1080
return ;
@@ -2464,10 +2464,10 @@ static Boolean _CFPropertyListCreateFromUTF8Data(CFAllocatorRef allocator, CFDat
2464
2464
2465
2465
static CFDataRef _createUTF8DataFromString (CFAllocatorRef allocator , CFStringRef str ) {
2466
2466
CFIndex bytesNeeded = 0 ;
2467
- CFStringGetBytes (str , CFRangeMake (0 , CFStringGetLength (str )), kCFStringEncodingUTF8 , 0 , false, NULL , 0 , & bytesNeeded );
2467
+ CFStringGetBytes (str , CFRangeMake (0 , CFStringGetLengthUTF8 (str )), kCFStringEncodingUTF8 , 0 , false, NULL , 0 , & bytesNeeded );
2468
2468
2469
2469
const char * bytes = (const char * )CFAllocatorAllocate (allocator , bytesNeeded , 0 );
2470
- CFStringGetBytes (str , CFRangeMake (0 , CFStringGetLength (str )), kCFStringEncodingUTF8 , 0 , false, (uint8_t * )bytes , bytesNeeded , NULL );
2470
+ CFStringGetBytes (str , CFRangeMake (0 , CFStringGetLengthUTF8 (str )), kCFStringEncodingUTF8 , 0 , false, (uint8_t * )bytes , bytesNeeded , NULL );
2471
2471
2472
2472
CFDataRef utf8Data = CFDataCreateWithBytesNoCopy (allocator , (const UInt8 * )bytes , bytesNeeded , allocator );
2473
2473
return utf8Data ;
0 commit comments