aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-10-08 20:11:47 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-10-08 20:11:47 +0800
commite9f8a258a862adfa17aa9882e46c54b1738f4ad9 (patch)
tree2c2ccf142cf472a0af567e7559333f67a832fbf9
parent5797ca85c1bba012f1e33c9701cb7bbe77ed80a4 (diff)
bssap.c: Fix unaligned memory access by using the read_data16
-rw-r--r--openbsc/src/bssap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/bssap.c b/openbsc/src/bssap.c
index 35a90ab05..56eb82e9c 100644
--- a/openbsc/src/bssap.c
+++ b/openbsc/src/bssap.c
@@ -527,7 +527,7 @@ static int bssmap_handle_assignm_req(struct sccp_connection *conn,
goto reject;
}
- cic = ntohs(*(u_int16_t *)TLVP_VAL(&tp, GSM0808_IE_CIRCUIT_IDENTITY_CODE));
+ cic = ntohs(read_data16(TLVP_VAL(&tp, GSM0808_IE_CIRCUIT_IDENTITY_CODE)));
timeslot = cic & 0x1f;
multiplex = (cic & ~0x1f) >> 5;