public override void Bad() { byte data = CWE190_Integer_Overflow__Byte_console_readLine_add_61b.BadSource(); /* POTENTIAL FLAW: if data == byte.MaxValue, this will overflow */ byte result = (byte)(data + 1); IO.WriteLine("result: " + result); }
public override void Bad() { byte data = CWE190_Integer_Overflow__Byte_console_readLine_add_61b.BadSource(); /* POTENTIAL FLAW: if data == byte.MaxValue, this will overflow */ byte result = (byte)(data + 1); IO.WriteLine("result: " + result); }