func: void bad() TwoIntsClass * data ; data = NULL; data = new TwoIntsClass [ 50 ]; CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805_class_memcpy_82_base * baseObject = new CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805_class_memcpy_82_bad baseObject -> action ( data ); void CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805_class_memcpy_82_bad::action(TwoIntsClass * data) TwoIntsClass source [ 100 ] ; size_t i ; for (i = 0; i < 100; i++) source [ i ] . intOne = 0; source [ i ] . intTwo = 0; memcpy ( data , source , 100 * sizeof ( TwoIntsClass ) ); printIntLine ( data [ 0 ] . intOne ); void printIntLine (int intNumber) printf ( "%d\n" , intNumber ); delete [ ] data 