summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-10-11 07:56:06 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-10-11 09:25:14 +0200
commitdaa653fc2268ca99389ef2730abf5fe000eb7a37 (patch)
treec50a66012f9f882c0e41fd34567b54cfacb73741 /include
parent00cb5700e65ef8bf4e86bdb0b45084265d73e5d9 (diff)
ussd: Add a test case, switch parsing to use a gsm48_hdr and len
The current USSD code is not doing any size checks, add a test case to find out how easily we access the data out of bounds. Begin to use the length in some places.
Diffstat (limited to 'include')
-rw-r--r--include/osmocore/gsm0480.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/osmocore/gsm0480.h b/include/osmocore/gsm0480.h
index ae92c1f9..94ac7174 100644
--- a/include/osmocore/gsm0480.h
+++ b/include/osmocore/gsm0480.h
@@ -2,6 +2,8 @@
#define gsm0480_h
#include "msgb.h"
+#include "protocol/gsm_04_08.h"
+#include "protocol/gsm_04_80.h"
#define MAX_LEN_USSD_STRING 31
@@ -11,7 +13,7 @@ struct ussd_request {
uint8_t invoke_id;
};
-int gsm0480_decode_ussd_request(const struct msgb *msg,
+int gsm0480_decode_ussd_request(const struct gsm48_hdr *hdr, uint16_t len,
struct ussd_request *request);
struct msgb *gsm0480_create_unstructuredSS_Notify(int alertPattern, const char *text);