Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: decrement types.Dec max length to keep decimal bits in DecimalPrecisionBits #11772

Merged
merged 4 commits into from
Apr 27, 2022

Commits on Apr 27, 2022

  1. fix: decrement types.Dec max length to keep decimal bits in DecimalPr…

    …ecisionBits
    
    As found by OSS-Fuzz, large numbers may overflow the current maxDecBitLen because
    it assumes that DecimalPrecisionBits (60) can always be represented by Precision (18)
    base-10 digits. Since 2^60 is larger than 2^18, this assumption is false.
    
    This change fixes cosmos#11732 by only allowing 59 bits of precision on top of the 256
    maxBitLen allowed for the integer part.
    elias-orijtech committed Apr 27, 2022
    Configuration menu
    Copy the full SHA
    7b66546 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ee02e6f View commit details
    Browse the repository at this point in the history
  3. Update CHANGELOG.md

    alexanderbez authored Apr 27, 2022
    Configuration menu
    Copy the full SHA
    62f7acc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9f46bac View commit details
    Browse the repository at this point in the history