Reranko05 opened a new pull request, #49660:
URL: https://github.com/apache/arrow/pull/49660

   ### Rationale for this change
   
   `arrow::util::base64_decode` silently truncates output when encountering 
invalid base64 characters, returning partial results without signaling an 
error. This can lead to unintended data corruption.
   
   ### What changes are included in this PR?
   
   - Add upfront validation of input characters in base64_decode
   - Return an empty string if invalid base64 characters are detected
   - Prevent silent truncation of decoded output
   
   ### Are these changes tested?
   
   Yes. A unit test has been added to verify that invalid input returns an 
empty string.
   
   ### Are there any user-facing changes?
   
   Yes. Previously, invalid base64 input could result in partial decoded 
output. Now, such inputs return an empty string.
   
   **This PR contains a "Critical Fix".**
   
   This change fixes a correctness issue where invalid base64 input could 
result in silently truncated output, leading to incorrect data being produced. 
The fix ensures such inputs are detected and handled safely.


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