From 0c83670a595a278b7d1fb7b21b2eacab84d3c031 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 12 Jul 2011 00:02:09 +0200 Subject: GSM 08.08: Fix generation of CIPHER MODE REJECT The message has a total length of 4 octets, so don't allocate only 3 in the msgb. --- src/gsm/gsm0808.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index 9cd70a06..eae15982 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -159,7 +159,7 @@ struct msgb *gsm0808_create_cipher_reject(uint8_t cause) if (!msg) return NULL; - msg->l3h = msgb_put(msg, 3); + msg->l3h = msgb_put(msg, 4); msg->l3h[0] = BSSAP_MSG_BSS_MANAGEMENT; msg->l3h[1] = 2; msg->l3h[2] = BSS_MAP_MSG_CIPHER_MODE_REJECT; -- cgit v1.2.3