From 04a46d091bb6367f961d184e5f103a95253ce4f1 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Fri, 3 May 2019 00:37:31 +0200 Subject: 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 --- src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3