Description
The methods add(int) and subtract(int) in the class org.apache.commons.numbers.fraction.Fraction do not take into account the risk of an integer overflow. For example, (231 - 1)/2 + 1 = (231 + 1)/2, so the numerator overflows an int, but when calculated with Fraction.add(int), the method still returns normally.
Attachments
Attachments
Issue Links
- links to