It seems to me that you're mixing (signed) int (x and y) and unsigned int (UINT_MAX).
As for securely implementing overflow checks for signed addition, this seems to be useful: http://blog.regehr.org/archives/1139
As for securely implementing overflow checks for signed addition, this seems to be useful: http://blog.regehr.org/archives/1139
No comments yet.