Skip to content

Fix UB due to null pointers passed to std::slice::from_raw_parts{,-mut} if an empty unicode string has a null pointer as buffer - #4

Open
Fulgen301 wants to merge 1 commit into
ColinFinck:masterfrom
Fulgen301:master
Open

Fix UB due to null pointers passed to std::slice::from_raw_parts{,-mut} if an empty unicode string has a null pointer as buffer#4
Fulgen301 wants to merge 1 commit into
ColinFinck:masterfrom
Fulgen301:master

Conversation

@Fulgen301

Copy link
Copy Markdown

Fixes #3

I chose to check the buffer pointer as opposed to the length to preserve the pointer for 0 length strings with a non-null buffer.

…t} if an empty unicode string has a null pointer as buffer
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.

Unsoundness due to std::slice::from_raw_parts usage with empty unicode strings

1 participant