mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
fix heap overflow with unstable version comparation
fixes #5210 fixes #5251 (the removeDuplicates line) The issue was mostly with the Version parsing and compring implementation. Refactored that based on the https://git.sleeping.town/exa/FlexVer examples. Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
156b7f365e
commit
5a0931d3cf
4 changed files with 175 additions and 226 deletions
9
tests/testdata/Version/test_vectors.txt
vendored
9
tests/testdata/Version/test_vectors.txt
vendored
|
|
@ -1,5 +1,5 @@
|
|||
# Test vector from:
|
||||
# https://github.com/unascribed/FlexVer/blob/704e12759b6e59220ff888f8bf2ec15b8f8fd969/test/test_vectors.txt
|
||||
# https://git.sleeping.town/exa/FlexVer/src/branch/trunk/test/test_vectors.txt
|
||||
#
|
||||
# This test file is formatted as "<lefthand> <operator> <righthand>", seperated by the space character
|
||||
# Implementations should ignore lines starting with "#" and lines that have a length of 0
|
||||
|
|
@ -61,3 +61,10 @@ a1.1.2 < a1.1.2_01
|
|||
13w02a < c0.3.0_01
|
||||
0.6.0-1.18.x < 0.9.beta-1.18.x
|
||||
|
||||
# removeLeadingZeroes (#17)
|
||||
0000.0.0 = 0.0.0
|
||||
0000.00.0 = 0.00.0
|
||||
0.0.0 = 0.00.0000
|
||||
# General leading zeroes
|
||||
1.0.01 = 1.0.1
|
||||
1.0.0001 = 1.0.01
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue