text: /* TEMPLATE GENERATED TESTCASE FILE
  Filename: CWE617_Reachable_Assertion__fgets_63b.c
  Label Definition File: CWE617_Reachable_Assertion.label.xml
  Template File: sources-sink-63b.tmpl.c
  */
  /*
   * @description
   * CWE: 617 Reachable Assertion
   * BadSource: fgets Read data from the console using fgets()
   * GoodSource: Number greater than ASSERT_VALUE
   * Sinks:
   *    BadSink : Assert if n is less than ASSERT_VALUE
   * Flow Variant: 63 Data flow: pointer to data passed from one function to another in different source files
   *
   * */
  
  #include "std_testcase.h"
  
  #include <assert.h>
  
  #define ASSERT_VALUE 5
  
  #define CHAR_ARRAY_SIZE sizeof(data)*sizeof(data)
  
  #ifndef OMITBAD
  
  void CWE617_Reachable_Assertion__fgets_63b_bad_sink(int * data_ptr)
  {
      int data = *data_ptr;
      /* POTENTIAL FLAW: this assertion could trigger if n < ASSERT_VALUE */
      assert(data > ASSERT_VALUE);
  }
  
  #endif /* OMITBAD */
  
  #ifndef OMITGOOD
  
  /* goodG2B uses the GoodSource with the BadSink */
  void CWE617_Reachable_Assertion__fgets_63b_goodG2B_sink(int * data_ptr)
  {
      int data = *data_ptr;
      /* POTENTIAL FLAW: this assertion could trigger if n < ASSERT_VALUE */
      assert(data > ASSERT_VALUE);
  }
  
  #endif /* OMITGOOD */
  