text: /* TEMPLATE GENERATED TESTCASE FILE
  Filename: CWE122_Heap_Based_Buffer_Overflow__sizeof_int64_t_82_bad.cpp
  Label Definition File: CWE122_Heap_Based_Buffer_Overflow__sizeof.label.xml
  Template File: sources-sink-82_bad.tmpl.cpp
  */
  /*
   * @description
   * CWE: 122 Heap Based Buffer Overflow
   * BadSource:  Initialize the source buffer using the size of a pointer
   * GoodSource: Initialize the source buffer using the size of the DataElementType
   * Sinks:
   *    BadSink : Print then free data
   * Flow Variant: 82 Data flow: data passed in a parameter to an virtual method called via a pointer
   *
   * */
  #ifndef OMITBAD
  
  #include "std_testcase.h"
  #include "CWE122_Heap_Based_Buffer_Overflow__sizeof_int64_t_82.h"
  
  namespace CWE122_Heap_Based_Buffer_Overflow__sizeof_int64_t_82
  {
  
  void CWE122_Heap_Based_Buffer_Overflow__sizeof_int64_t_82_bad::action(int64_t * data)
  {
      /* POTENTIAL FLAW: Attempt to use data, which may not have enough memory allocated */
      printLongLongLine(*data);
      free(data);
  }
  
  }
  #endif /* OMITBAD */
  