Fix undefined behavior (unaligned write) in protocol.cc Change-Id: Ia7cf7734e534bfeef689e54c56d95d0d5cab2584
diff --git a/protocol.cc b/protocol.cc index 744dc04..c70e940 100644 --- a/protocol.cc +++ b/protocol.cc
@@ -163,7 +163,7 @@ len != sizeof(T)) { return false; } - *out_value = *reinterpret_cast<const T *>(data); + memcpy(out_value, data, sizeof(T)); return true; }