Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce113b78 authored by Mårten Kongstad's avatar Mårten Kongstad
Browse files

Build.parseFullVersion: verify values are within acceptable range

When converting a major.minor version String to a Java int, only so many
digits can fit. This puts a hard limit on the maximum value of the major
and minor versions:

  - major must be less than 21_474
  - minor must be less than 100_000

Update Build.parseFullVersion to fail if either value is larger than the
limit.

Note: neither major nor minor version can be negative:
Build.parseFullVersion already checks for that.

Bug: 380245536
Test: atest FrameworksCoreTests:android.os.BuildTest
Flag: EXEMPT trivial bugfix
Change-Id: I5004ca7c0553110cdab3fe66fe15ece6ce6846ba
parent 10b79530
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment