rem: sprintf(temp,"%02d%02d%02dZ",data->hour,data->minute,data->second);
add: snprintf(temp,sizeof(temp),"%02d%02d%02dZ",data->hour,data->minute,data->second);
context: void print_time_to_string(char* str,  struct icaltimetype *data){    char temp[20];    if (data->is_utc == 1){	sprintf(temp,"%02d%02d%02dZ",data->hour,data->minute,data->second);    } else {	sprintf(temp,"%02d%02d%02d",data->hour,data->minute,data->second);    }    strcat(str,temp);}