text: /* TEMPLATE GENERATED TESTCASE FILE
  Filename: CWE762_Mismatched_Memory_Management_Routines__new_array_delete_char_52b.cpp
  Label Definition File: CWE762_Mismatched_Memory_Management_Routines__new_array_delete.label.xml
  Template File: sources-sinks-52b.tmpl.cpp
  */
  /*
   * @description
   * CWE: 762 Mismatched Memory Management Routines
   * BadSource:  Allocate data using new []
   * GoodSource: Allocate data using new
   * Sinks:
   *    GoodSink: Deallocate data using delete []
   *    BadSink : Deallocate data using delete
   * Flow Variant: 52 Data flow: data passed as an argument from one function to another to another in three different source files
   *
   * */
  
  #include "std_testcase.h"
  
  namespace CWE762_Mismatched_Memory_Management_Routines__new_array_delete_char_52
  {
  
  #ifndef OMITBAD
  
  /* bad function declaration */
  void badSink_c(char * data);
  
  void badSink_b(char * data)
  {
      badSink_c(data);
  }
  
  #endif /* OMITBAD */
  
  #ifndef OMITGOOD
  
  /* goodG2B uses the GoodSource with the BadSink */
  void goodG2BSink_c(char * data);
  
  void goodG2BSink_b(char * data)
  {
      goodG2BSink_c(data);
  }
  
  /* goodB2G uses the BadSource with the GoodSink */
  void goodB2GSink_c(char * data);
  
  void goodB2GSink_b(char * data)
  {
      goodB2GSink_c(data);
  }
  
  #endif /* OMITGOOD */
  
  } /* close namespace */
  