-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-45126: [C++][Parquet] Fix undefined behavior in the FormatStatValue (
#45127) ### Rationale for this change FormatStatValue function in the parquet/types.cc employs reinterpret_cast to cast bytes to specific data types. It is undefined behavior when the bytes are unaligned. ### What changes are included in this PR? Use std::memcpy to replace reinterpret_cast. ### Are these changes tested? Pass CI. ### Are there any user-facing changes? No. * GitHub Issue: #45126 Authored-by: Gang Wu <[email protected]> Signed-off-by: Gang Wu <[email protected]>
- Loading branch information
Showing
1 changed file
with
32 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters