[PATCH] libosmocore[master]: gsm0480: handle UnstructuredSS request with DSC != 0x0F

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/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Sat Jul 29 08:11:23 UTC 2017


gsm0480: handle UnstructuredSS request with DSC != 0x0F

Change-Id: I73d602f6f20b0afe7600d16bbd432069ae7be788
---
M src/gsm/gsm0480.c
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/76/3376/2

diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c
index de99223..87095d2 100644
--- a/src/gsm/gsm0480.c
+++ b/src/gsm/gsm0480.c
@@ -455,6 +455,17 @@
 		req->ussd_text_len = num_chars;
 
 		return 1;
+	} else {
+		num_chars = uss_req_data[6];
+		/* Prevent a mobile-originated buffer-overrun! */
+		if (num_chars > MAX_LEN_USSD_STRING)
+			num_chars = MAX_LEN_USSD_STRING;
+
+		req->ussd_text_language = dcs;
+		req->ussd_text_len = num_chars;
+		memcpy(req->ussd_text, &(uss_req_data[7]), num_chars);
+
+		return 1;
 	}
 
 	return 0;

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I73d602f6f20b0afe7600d16bbd432069ae7be788
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list