summaryrefslogtreecommitdiffstats
path: root/src/host
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-05-03 00:37:31 +0200
committerVadim Yanitskiy <axilirator@gmail.com>2019-05-03 00:48:35 +0200
commit04a46d091bb6367f961d184e5f103a95253ce4f1 (patch)
tree1cb96724c1e272ab6373b4c73592617f19a0503d /src/host
parente8c179a5755b2429fcaeb43430672f1587d56931 (diff)
mobile/gsm48_rr.h: mark gsm48_rr_hdr struct as packed
In both gsm48_mm.c and gsm48_rr.c we put / push 'gsm48_rr_hdr' structure into the message buffers, so then it's retrieved by the message receivers. The AddressSanitizer complains about unaligned pointer access and potentially unexpected behaviour. Change-Id: I8aa2c0074b405afd0e76044ef076b6819fe1083b
Diffstat (limited to 'src/host')
-rw-r--r--src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
index 6235bfdb..6996ff35 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
@@ -61,7 +61,7 @@ struct gsm48_rr_hdr {
uint32_t msg_type; /* RR-* primitive */
uint8_t sapi;
uint8_t cause;
-};
+} __attribute__((packed));
/* GSM 04.07 9.1.1 */
#define GSM48_RR_ST_IDLE 0