IES_DECODE_U16 macro: load from 16-bit aligned address
The IES_DECODE_U16 macro loads a 16 bit integer from an arbitrary address; this can lead to reads from misaligned addresses, and undefined behavior sanitizer warns, like, e.g., so: openair3/NAS/COMMON/IES/ProtocolConfigurationOptions.c:62:5: runtime error: load of misaligned address 0x7f3c24032c01 for type 'uint16_t', which requires 2 byte alignment To fix this, first use memcpy() to load to a 16-bit aligned address, then do the actual decoding.
Showing
Please register or sign in to comment