News for hackers. Stuff that matters.
Re:How to break everything by fuzz testing by jra_samba_org on Sunday April 26, 2020 @11:15PM (#22992557)
Yeah, I've gotten to the point where I can't do any arithmetic on any values without immediately adding integer wrap tests afterwards.
Re:How to break everything by fuzz testing by mcswell on Monday April 27, 2020 @11:53PM (#23003179)
Reminds me of using a slide rule. You normally push the inner part (the C scale) to the right, line up the 1 on the C scale with the first number you're multiplying on the D scale, then look on the C scale for the second number you're multiplying, and read the result off the D scale immediately below that.

But when the result is more than 10, you've wrapped: your answer is off the D scale. So now you have to push the inner part back to the left, and line up the 10 (usually marked as 1, at the right-hand end) on the C scale with the first number on the D scale. And remember to add 1 to the exponent.

I've seen slide rules where the D scale goes slightly beyond 10 (like 10.1), so if the result was just a tiny bit over 10, you wouldn't need to wrap.

Re:How to break everything by fuzz testing by MaxBarraclough on Monday April 27, 2020 @06:37AM (#22994587)
Something the C# language gets right is that it can be configured to throw on overflow, or to wrap-around.