func: static void goodG2B() int data ; CWE122_Heap_Based_Buffer_Overflow__c_CWE129_rand_67_structType myStruct ; data = - 1; data = 7; myStruct . structFirst = data; CWE122_Heap_Based_Buffer_Overflow__c_CWE129_rand_67b_goodG2BSink ( myStruct ); void CWE122_Heap_Based_Buffer_Overflow__c_CWE129_rand_67b_goodG2BSink(CWE122_Heap_Based_Buffer_Overflow__c_CWE129_rand_67_structType myStruct) int data = myStruct . structFirst ; int i ; int * buffer = ( int * ) malloc ( 10 * sizeof ( int ) ) ; for (i = 0; i < 10; i++) buffer [ i ] = 0; if ( data >= 0 )  buffer [ data ] = 1; free ( buffer ); 