[PATCH] openbsc[master]: LIBMSC: Use sms->text, not sms->user_data to construct repor...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Keith Whyte gerrit-no-reply at lists.osmocom.org
Mon Aug 14 13:28:30 UTC 2017


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
---
M openbsc/src/libmsc/gsm_04_11.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/17/3517/3

diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c
index d56a97c..5e736b3 100644
--- a/openbsc/src/libmsc/gsm_04_11.c
+++ b/openbsc/src/libmsc/gsm_04_11.c
@@ -666,7 +666,7 @@
 	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);
 

-- 
To view, visit https://gerrit.osmocom.org/3517
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id51bc9483ad6f52d6da74135605cfd12434c7c96
Gerrit-PatchSet: 3
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Keith Whyte <keith at rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pablo Neira Ayuso <pablo at gnumonks.org>



More information about the gerrit-log mailing list