Skip to content

Fix reading metadata with zeros#4876

Merged
Emanuele Sabellico (emasab) merged 3 commits intomasterfrom
dev_fix_zero_in_metadata
Oct 16, 2024
Merged

Fix reading metadata with zeros#4876
Emanuele Sabellico (emasab) merged 3 commits intomasterfrom
dev_fix_zero_in_metadata

Conversation

@emasab
Copy link
Copy Markdown
Contributor

Closes: #4649.
When retrieving offset metadata, if the binary value contained zeros
and librdkafka was configured with strndup, part of
the buffer after first zero contained uninitialized data
instead of rest of metadata. Solved by avoiding to use
strndup for copying metadata.
Happens since: 0.9.0

@emasab Emanuele Sabellico (emasab) requested a review from a team as a code owner October 16, 2024 07:30
@confluent-cla-assistant
Copy link
Copy Markdown

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

@airlock-confluentinc airlock-confluentinc Bot force-pushed the dev_fix_zero_in_metadata branch from 2ea4b35 to 4f85048 Compare October 16, 2024 08:51
@emasab Emanuele Sabellico (emasab) deleted the dev_fix_zero_in_metadata branch October 16, 2024 13:56
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.

Reading committed offsets where metadata contains null byte leads to reading random data after null byte.

2 participants