nileshkumar3 opened a new pull request, #22503:
URL: https://github.com/apache/kafka/pull/22503

   ## Summary
   Fixes [KAFKA-20658](https://issues.apache.org/jira/browse/KAFKA-20658).
   When the Cast SMT casts a Connect `BYTES` field to `STRING`, `ByteBuffer`
   values are Base64-encoded in `castToString()`. The code used
   `Utils.readBytes(ByteBuffer)`, which reads bytes `[0, limit)` and ignores
   `position()`.
   For sliced heap buffers this produces the wrong Base64 string (silent data
   corruption). Use `Utils.toArray(ByteBuffer)` instead, matching
   `Values.convertToBytes()` and reading the buffer's logical remaining bytes
   for both heap-backed and direct buffers.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to