Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] No longer truncate ByteArray values by nullbytes #5517

Merged
merged 1 commit into from
Nov 28, 2022

Conversation

Tishj
Copy link
Contributor

@Tishj Tishj commented Nov 28, 2022

This PR fixes #5443

By treating the returned char* from PyByteArray_AS_STRING as a string (null-terminated)
We truncated the bytearray by a nullbyte, which we shouldn't

(re-opened #5515 as a PR to master instead)

Copy link
Collaborator

@Mytherin Mytherin left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM

@Mytherin Mytherin merged commit 6769498 into duckdb:master Nov 28, 2022
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.

Null bytes cause string termination for python bytearray
2 participants