func: void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_67_bad() int data ; CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_67_structType myStruct ; data = - 1; data = INT_MAX / 2 + 2; myStruct . structFirst = data; CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_67b_badSink ( myStruct ); void CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_67b_badSink(CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_fixed_67_structType myStruct) int data = myStruct . structFirst ; size_t i ; int * intPointer ; intPointer = ( int * ) malloc ( data * sizeof ( int ) ); for (i = 0; i < (size_t)data; i++) intPointer [ i ] = 0; free ( intPointer ); 