Skip to content

CFStringRef#stringValue buffer needs space for null byte#1343

Merged
dbwiddis merged 1 commit into
java-native-access:masterfrom
dbwiddis:cfstr
Apr 22, 2021
Merged

CFStringRef#stringValue buffer needs space for null byte#1343
dbwiddis merged 1 commit into
java-native-access:masterfrom
dbwiddis:cfstr

Conversation

@dbwiddis

Copy link
Copy Markdown
Contributor

Fixes #1342

Existing test case changed to fail by providing a unicode string that uses the max number of bytes. Fixed by adding a byte for null.

@matthiasblaesing matthiasblaesing left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CoreFoundation's CFStringRef#stringValue doesn't add space for terminating null

2 participants