memset(tr->terminal_rsp_data.send_ussd.text.string, 0x00,
sizeof(tr->terminal_rsp_data.send_ussd.text.string));
if (packed_data) {
- memcpy((void*)tr->terminal_rsp_data.send_ussd.text.string, packed_data, strlen(packed_data));
+ snprintf(tr->terminal_rsp_data.send_ussd.text.string, strlen(packed_data) + 1, "%s", packed_data);
tr->terminal_rsp_data.send_ussd.text.string_length = strlen(packed_data);
g_free(packed_data);
}
tr->terminal_rsp_data.open_channel.bearer_desc.bearer_parameter.local_link_bearer_param.service_type = service_type;
if (service_record) {
- memcpy(tr->terminal_rsp_data.open_channel.bearer_desc.bearer_parameter.local_link_bearer_param.service_record, service_record, strlen(service_record));
+ snprintf(tr->terminal_rsp_data.open_channel.bearer_desc.bearer_parameter.local_link_bearer_param.service_record,
+ strlen(service_record) + 1, "%s", service_record);
g_free(service_record);
}
} break;
packed_data = (char*) tcore_util_pack_gsm7bit((const unsigned char *)tmp_str, tmp_len);
if (packed_data) {
- memcpy((void*)tr->terminal_rsp_data.get_input.text.string, packed_data, strlen(packed_data));
+ snprintf(tr->terminal_rsp_data.get_input.text.string, strlen(packed_data) + 1, "%s", packed_data);
tr->terminal_rsp_data.get_input.text.string_length = strlen(packed_data);
g_free(packed_data);