From e6222ef1acc9947dba82898a2371f48e4f3848e1 Mon Sep 17 00:00:00 2001 From: Keith Date: Mon, 14 Aug 2017 15:11:57 +0200 Subject: LIBMSC: Use sms->text, not sms->user_data to construct report body gsm_04_11.c sms_report_alloc() Use the sms->text, not the sms->user_data to construct the report body. This also prevents the potential output of non printable characters to the log and or vty. Change-Id: Id51bc9483ad6f52d6da74135605cfd12434c7c96 --- openbsc/src/libmsc/gsm_04_11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbsc/src') diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c index d56a97c3a..5e736b3d5 100644 --- a/openbsc/src/libmsc/gsm_04_11.c +++ b/openbsc/src/libmsc/gsm_04_11.c @@ -666,7 +666,7 @@ static struct gsm_sms *sms_report_alloc(struct gsm_sms *sms) len = snprintf((char *)sms_report->user_data, sizeof(sms_report->user_data), "id:%.08llu sub:000 dlvrd:000 submit date:YYMMDDhhmm done date:YYMMDDhhmm stat:DELIVRD err:000 text:%.20s", - sms->id, sms->user_data); + sms->id, sms->text); sms_report->user_data_len = len; LOGP(DLSMS, LOGL_NOTICE, "%s\n", sms_report->user_data); -- cgit v1.2.3