witnet / elliptic-curve-solidity

Elliptic Curve arithmetic operations written in Solidity
MIT License
166 stars 40 forks source link

Integer Overflow #21

Closed clbartoli closed 4 years ago

clbartoli commented 4 years ago

Description

As you can notice, at the beginning of the function the value of x has increased by 1, consequently it would produce an integer overflow and the result of said SQRT would be incorrect.

image