You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened:
I think I've found a bug in portage compare function.
the bug happens in this part -
r1 := big.NewInt(0)
if match1[9] != "" {
r1.SetString(match1[9], 10)
}
r2 := big.NewInt(0)
if match2[9] != "" {
r1.SetString(match2[9], 10)
}
The r1.SetString(match2[9], 10) in the 2nd time should be r2.SetString(match2[9], 10)
What you expected to happen:
the 1.2.3-r2 should be higher than 1.2.3-r1 How to reproduce it (as minimally and precisely as possible):
run the below code
res := comparePortageVersions("1.2.3-r1", "1.2.3-r2")
print(res)
Anything else we need to know?:
Environment:
Output of grype version: latest
OS (e.g: cat /etc/os-release or similar): macOS
The text was updated successfully, but these errors were encountered:
What happened:
I think I've found a bug in portage compare function.
the bug happens in this part -
What you expected to happen:
the 1.2.3-r2 should be higher than 1.2.3-r1
How to reproduce it (as minimally and precisely as possible):
run the below code
Anything else we need to know?:
Environment:
grype version
: latestcat /etc/os-release
or similar): macOSThe text was updated successfully, but these errors were encountered: