Commits


Matt Topol authored and GitHub committed b1bb4808d2a
GH-45180: [C++][Fuzzing] Fix Negation bug discovered by fuzzing (#45181) ### Rationale for this change If the value for Decimal32 or Decimal64 is `INT32_MIN` or `INT64_MIN` respectively, then UBSAN reports an issue when calling Negate on them due to overflow. ### What changes are included in this PR? Have the `Negate` methods of Decimal32 and Decimal64 use `arrow::internal::SafeSignedNegate`. ### Are these changes tested? Unit tests were added for both cases which were able to reproduce the problem when UBSAN was on without the fix. ### Are there any user-facing changes? No. * OSS-Fuzz issue: https://issues.oss-fuzz.com/issues/371239168 * GitHub Issue: #45180 Authored-by: Matt Topol <zotthewizard@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>