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

Fix reading metadata with zeros #4876

Merged
merged 3 commits into from
Oct 16, 2024
Merged

Fix reading metadata with zeros #4876

merged 3 commits into from
Oct 16, 2024

Conversation

emasab
Copy link
Contributor

@emasab emasab commented Oct 16, 2024

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 emasab requested a review from a team as a code owner October 16, 2024 07:30
@confluent-cla-assistant
Copy link

🎉 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.

@emasab emasab merged commit 88604ca into master Oct 16, 2024
2 checks passed
@emasab 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