text: /* TEMPLATE GENERATED TESTCASE FILE
  Filename: CWE191_Integer_Underflow__int_fscanf_54b.c
  Label Definition File: CWE191_Integer_Underflow__int.label.xml
  Template File: sources-sinks-54b.tmpl.c
  */
  /*
   * @description
   * CWE: 191 Integer Underflow
   * BadSource: fscanf Read data from the console using fscanf()
   * GoodSource: Greater than INT_MIN
   * Sinks:
   *    GoodSink: Ensure there is no underflow before performing the subtraction
   *    BadSink : Subtract 1 from data
   * Flow Variant: 54 Data flow: data passed as an argument from one function through three others to a fifth; all five functions are in different source files
   *
   * */
  
  #include "std_testcase.h"
  
  #ifndef OMITBAD
  
  /* bad function declaration */
  void CWE191_Integer_Underflow__int_fscanf_54c_bad_sink(int data);
  
  void CWE191_Integer_Underflow__int_fscanf_54b_bad_sink(int data)
  {
      CWE191_Integer_Underflow__int_fscanf_54c_bad_sink(data);
  }
  
  #endif /* OMITBAD */
  
  #ifndef OMITGOOD
  
  /* goodG2B uses the GoodSource with the BadSink */
  void CWE191_Integer_Underflow__int_fscanf_54c_goodG2B_sink(int data);
  
  void CWE191_Integer_Underflow__int_fscanf_54b_goodG2B_sink(int data)
  {
      CWE191_Integer_Underflow__int_fscanf_54c_goodG2B_sink(data);
  }
  
  /* goodB2G uses the BadSource with the GoodSink */
  void CWE191_Integer_Underflow__int_fscanf_54c_goodB2G_sink(int data);
  
  void CWE191_Integer_Underflow__int_fscanf_54b_goodB2G_sink(int data)
  {
      CWE191_Integer_Underflow__int_fscanf_54c_goodB2G_sink(data);
  }
  
  #endif /* OMITGOOD */
  