aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2014-06-27 17:05:47 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-07-07 19:04:32 +0200
commit8a485f0becca7bbcd2a34de9d0dfd88ce8fcecaf (patch)
tree0e9f47c9d70f56b6a7078438333bfd43701b0755 /openbsc/src/osmo-bsc
parent99a20d6be157659e7cfc87b357bf928196ba2c71 (diff)
libbsc, osmo-bsc{, _nat}: Prevent unaligned access when casting TLVP_VAL
foo = *((uintXX_t *) TLVP_VAL(...) can lead to unaligned access. To prevent that use tlvp_valXX_unal() to get the values.
Diffstat (limited to 'openbsc/src/osmo-bsc')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_bssap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c
index c2c241732..f58d96f03 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c
@@ -135,7 +135,7 @@ static int bssmap_handle_paging(struct osmo_msc_data *msc,
if (TLVP_PRESENT(&tp, GSM0808_IE_TMSI) &&
TLVP_LEN(&tp, GSM0808_IE_TMSI) == 4) {
- tmsi = ntohl(*(uint32_t *) TLVP_VAL(&tp, GSM0808_IE_TMSI));
+ tmsi = ntohl(tlvp_val32_unal(&tp, GSM0808_IE_TMSI));
}
/*