public override void Bad() { sbyte data; /* init data */ data = 0; /* POTENTIAL FLAW: Read data from console with ReadLine*/ try { string stringNumber = Console.ReadLine(); if (stringNumber != null) { data = sbyte.Parse(stringNumber.Trim()); } } catch (IOException exceptIO) { IO.Logger.Log(NLog.LogLevel.Warn, "Error with stream reading", exceptIO); } catch (FormatException exceptNumberFormat) { IO.Logger.Log(NLog.LogLevel.Warn, "Error with number parsing", exceptNumberFormat); } CWE191_Integer_Underflow__SByte_console_ReadLine_sub_53b.BadSink(data); }