aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-07-12 00:02:09 +0200
committerHarald Welte <laforge@gnumonks.org>2011-07-12 00:02:27 +0200
commit0c83670a595a278b7d1fb7b21b2eacab84d3c031 (patch)
tree8ef9bb3d67dfe3f5cd7e4928697f83f72f7e3b36
parent9b837e6fda6d33474e16613e3bcd47dc6f60ae25 (diff)
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.
-rw-r--r--src/gsm/gsm0808.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c
index 9cd70a0..eae1598 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;