func: static void goodG2B() wchar_t * data ; structType myStruct ; data = new wchar_t [ 100 ]; wmemset ( data , L 'A' , 50 - 1 data [ 50 - 1 ] = L '\0' myStruct . structFirst = data; goodG2BSink ( myStruct ); void goodG2BSink(structType myStruct) wchar_t * data = myStruct . structFirst ; wchar_t dest [ 50 ] = L "" memcpy ( dest , data , wcslen ( data ) * sizeof ( wchar_t ) ); 