confluentinc / librdkafka

The Apache Kafka C/C++ library
Other
301 stars 3.15k forks source link

Fix reading metadata with zeros #4876

Closed emasab closed 1 month ago

emasab commented 1 month ago

Closes: https://github.com/confluentinc/librdkafka/issues/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

confluent-cla-assistant[bot] commented 1 month ago

:tada: 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.