summaryrefslogtreecommitdiff
path: root/documentation
diff options
context:
space:
mode:
authorMathias Krause <minipli@googlemail.com>2012-07-17 20:52:17 +0200
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-07-18 00:15:15 +0200
commitd2567c8d92cb2c816dc9e8078740aad93d14dc32 (patch)
tree6ea2f14dea5230af9d7199acb0ec261c74efc27c /documentation
parent117198662778778d132ee6077c1f39635adbadd9 (diff)
downloadcoreboot-d2567c8d92cb2c816dc9e8078740aad93d14dc32.tar.xz
cbfstool: make endian detection code more robust
Accessing the memory of a char array through a uint32_t pointer breaks strict-aliasing rules as it dereferences memory with lower alignment requirements than the type of the pointer requires. It's no problem on x86 as the architecture is able to handle unaligned memory access but other architectures are not. Fix this by doing the test the other way around -- accessing the first byte of a uint32_t variable though a uint8_t pointer. Change-Id: Id340b406597014232741c98a4fd0b7c159f164c2 Signed-off-by: Mathias Krause <minipli@googlemail.com> Reviewed-on: http://review.coreboot.org/1234 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins)
Diffstat (limited to 'documentation')
0 files changed, 0 insertions, 0 deletions