You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In __YAMLSerializationAddObject(), there is a call to yaml_document_add_scalar() with a pointer to the UTF8 form of the NSString, but the number of Unicode characters is used as the byte length of that UTF8 string. This will definitely be incorrect if the string has any characters that require more than 1 byte to represent in UTF8. In any case, since -[NSString UTF8String] returns a C string, it's sufficient to use a value of -1... code in yaml_document_add_scalar() will detect this and call strlen() on the C string to get the correct string length.
The text was updated successfully, but these errors were encountered:
In __YAMLSerializationAddObject(), there is a call to yaml_document_add_scalar() with a pointer to the UTF8 form of the NSString, but the number of Unicode characters is used as the byte length of that UTF8 string. This will definitely be incorrect if the string has any characters that require more than 1 byte to represent in UTF8. In any case, since -[NSString UTF8String] returns a C string, it's sufficient to use a value of -1... code in yaml_document_add_scalar() will detect this and call strlen() on the C string to get the correct string length.
The text was updated successfully, but these errors were encountered: