func: void bad() wchar_t * data ; wchar_t dataBuffer [ 100 ] ; data = dataBuffer; CWE121_Stack_Based_Buffer_Overflow__src_wchar_t_declare_cat_84_bad * badObject = new CWE121_Stack_Based_Buffer_Overflow__src_wchar_t_declare_cat_84_bad ( data ) ; CWE121_Stack_Based_Buffer_Overflow__src_wchar_t_declare_cat_84_bad::CWE121_Stack_Based_Buffer_Overflow__src_wchar_t_declare_cat_84_bad(wchar_t * dataCopy) data = dataCopy; wmemset ( data , L 'A' , 100 - 1 data [ 100 - 1 ] = L '\0' delete badObject CWE121_Stack_Based_Buffer_Overflow__src_wchar_t_declare_cat_84_bad::~CWE121_Stack_Based_Buffer_Overflow__src_wchar_t_declare_cat_84_bad() wchar_t dest [ 50 ] = L "" wcscat ( dest , data ); 