func: void CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_ncpy_03_bad() char * data ; if ( 5 == 5 )  data = ( char * ) malloc ( 50 * sizeof ( char ) ); data [ 0 ] = '\0'; strncpy ( data , source , 100 - 1 ); data [ 100 - 1 ] = '\0'; printLine ( data ); void printLine (const char * line) if ( line != NULL )  printf ( "%s\n" , line ); free ( data ); 