/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE590_Free_Memory_Not_on_Heap__delete_array_wchar_t_alloca_82.h
Label Definition File: CWE590_Free_Memory_Not_on_Heap__delete_array.label.xml
Template File: sources-sink-82.tmpl.h
*/
/*
 * @description
 * CWE: 590 Free Memory Not on Heap
 * BadSource: alloca Data buffer is allocated on the stack with alloca()
 * GoodSource: Allocate memory on the heap
 * Sinks:
 *    BadSink : Print then free data
 * Flow Variant: 82 Data flow: data passed in a parameter to a virtual method called via a pointer
 *
 * */

#include "std_testcase.h"

#include <wchar.h>

namespace CWE590_Free_Memory_Not_on_Heap__delete_array_wchar_t_alloca_82
{

class CWE590_Free_Memory_Not_on_Heap__delete_array_wchar_t_alloca_82_base
{
public:
    /* pure virtual function */
    virtual void action(wchar_t * data) = 0;
};

#ifndef OMITBAD

class CWE590_Free_Memory_Not_on_Heap__delete_array_wchar_t_alloca_82_bad : public CWE590_Free_Memory_Not_on_Heap__delete_array_wchar_t_alloca_82_base
{
public:
    void action(wchar_t * data);
};

#endif /* OMITBAD */

#ifndef OMITGOOD

class CWE590_Free_Memory_Not_on_Heap__delete_array_wchar_t_alloca_82_goodG2B : public CWE590_Free_Memory_Not_on_Heap__delete_array_wchar_t_alloca_82_base
{
public:
    void action(wchar_t * data);
};

#endif /* OMITGOOD */

}
