Skip to content

Conversation

@itingliu
Copy link
Contributor

In _withFixedCharBuffer helper, we allocate a buffer with the requested size + 1 (for null-termination). With the assumption that the closure's return value len <= the requested size, the null-terminated character should be on index len, not len + 1.

Fixes rdar://129154192

In `_withFixedCharBuffer` helper, we allocate a buffer with the requested size + 1 (for null-termination). With the assumption that the closure's return value `len <= the requested size`, the null-terminated character should be on index `len`, not `len + 1`.

Fixes rdar://129154192
@itingliu
Copy link
Contributor Author

@swift-ci please test

@itingliu itingliu merged commit a61b743 into swiftlang:main Jun 11, 2024
@itingliu itingliu deleted the pr/2244 branch June 11, 2024 16:08
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.

2 participants