mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
da37f7a586
Because the alignment of the data passed into from_slice is not checked, it is very easy to pass in unaligned data that will get dereferenced at a later point in the code. On ARM, this will lead to a SIGBUS. This change adds an alignment check to prevent getting a signal. Instead, the caller will get `None`. BUG=chromium:900962 TEST=cargo test -p data_model Change-Id: I7a0f835f7d0ffd8c3d44bbcd80a790027f652bc9 Reviewed-on: https://chromium-review.googlesource.com/1343989 Commit-Ready: Zach Reizner <zachr@chromium.org> Tested-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |