text: /* TEMPLATE GENERATED TESTCASE FILE
  Filename: CWE590_Free_Memory_Not_on_Heap__delete_char_static_53c.cpp
  Label Definition File: CWE590_Free_Memory_Not_on_Heap__delete.nonpointer.label.xml
  Template File: sources-sink-53c.tmpl.cpp
  */
  /*
   * @description
   * CWE: 590 Free Memory Not on Heap
   * BadSource: static Data buffer is declared static on the stack
   * GoodSource: Allocate memory on the heap
   * Sink:
   *    BadSink : Print then free data
   * Flow Variant: 53 Data flow: data passed as an argument from one function through two others to a fourth; all four functions are in different source files
   *
   * */
  
  #include "std_testcase.h"
  
  #include <wchar.h>
  
  namespace CWE590_Free_Memory_Not_on_Heap__delete_char_static_53
  {
  
  /* all the sinks are the same, we just want to know where the hit originated if a tool flags one */
  
  #ifndef OMITBAD
  
  /* bad function declaration */
  void badSink_d(char * data);
  
  void badSink_c(char * data)
  {
      badSink_d(data);
  }
  
  #endif /* OMITBAD */
  
  #ifndef OMITGOOD
  
  /* goodG2B uses the GoodSource with the BadSink */
  void goodG2BSink_d(char * data);
  
  void goodG2BSink_c(char * data)
  {
      goodG2BSink_d(data);
  }
  
  #endif /* OMITGOOD */
  
  } /* close namespace */
  