summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2016-07-21 15:33:31 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-07-22 13:35:56 -0700
commitb3a625f8fef1768d78eab4cfaaea270cb3fbd0c3 (patch)
treed472ca14b51562dc3522d844cbe50e742928e493 /tests
parentbea3f7979a4c3088da74accd1b68830214e0934d (diff)
downloadvboot-b3a625f8fef1768d78eab4cfaaea270cb3fbd0c3.tar.gz
vboot: Fix potential alignment issue reading FWMP
RollbackFwmpRead() assumed that a uint8[] array on the stack would be aligned sufficiently for typecasting to struct RollbackSpaceFwmp and accessing its members. This was true on x86 (where unaligned accesses work fine) and probably harmless on other platforms (since RollbackSpaceFwmp is __attribute__(packed). But it's cleaner to switch to using a union of the buffer and struct, since that will provide the proper alignment. BUG=chromium:601492 BRANCH=baytrail and newer platforms TEST=make -j runtests Change-Id: I97077923ab5809c68510cbd382541bf2827aba6b Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/362087 Commit-Ready: Dan Shi <dshi@google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions