--- corosync-2.4.5/cts/agents/cpg_test_agent.c 2019-07-30 20:26:27.000000000 +0800 +++ corosync-2.4.5-new/cts/agents/cpg_test_agent.c 2019-08-05 13:42:47.494088257 +0800 @@ -211,8 +211,8 @@ if (record_config_events_g > 0) { log_pt = malloc (sizeof(log_entry_t)); list_init (&log_pt->list); - snprintf (log_pt->log, LOG_STR_SIZE, "%s,%u,%u,left", - groupName->value, left_list[i].nodeid,left_list[i].pid); + assert(snprintf (log_pt->log, LOG_STR_SIZE, "%s,%u,%u,left", + groupName->value, left_list[i].nodeid,left_list[i].pid) < LOG_STR_SIZE); list_add_tail(&log_pt->list, &config_chg_log_head); qb_log (LOG_INFO, "cpg event %s", log_pt->log); } @@ -221,8 +221,8 @@ if (record_config_events_g > 0) { log_pt = malloc (sizeof(log_entry_t)); list_init (&log_pt->list); - snprintf (log_pt->log, LOG_STR_SIZE, "%s,%u,%u,join", - groupName->value, joined_list[i].nodeid,joined_list[i].pid); + assert(snprintf (log_pt->log, LOG_STR_SIZE, "%s,%u,%u,join", + groupName->value, joined_list[i].nodeid,joined_list[i].pid) < LOG_STR_SIZE); list_add_tail (&log_pt->list, &config_chg_log_head); qb_log (LOG_INFO, "cpg event %s", log_pt->log); }