Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-9948

[C++] Decimal128 does not check scale range when rescaling; can cause buffer overflow

    XMLWordPrintableJSON

Details

    Description

      BasicDecimal128::GetScaleMultiplier has a DCHECK on the scale, but the scale can come from users. For example, Decimal128::FromString("1e100") will cause an out-of-bound read.

      BasicDecimal128::Rescale and BasicDecimal128::GetWholeAndFraction have the same problem.

      Attachments

        Activity

          People

            apitrou Antoine Pitrou
            myzhong Mingyu Zhong
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 4h 20m
                4h 20m