diff options
author | Hung-Te Lin <hungte@chromium.org> | 2013-01-31 12:14:46 +0800 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2013-02-01 06:15:49 +0100 |
commit | d51557ade2a9f29cbb4e0f38d5a4920b42486168 (patch) | |
tree | 970bb9b9100e021bd7f626210e24fc65c7af3d23 /src/superio/ite/it8705f | |
parent | 05dccae75df4ed0c6a75867a89cf1a4055507e28 (diff) |
lib: Prevent unaligned memory access and fix endianess in LZMA decode library.
LZMA decode library used to retrieve output size by:
outSize = *(UInt32 *)(src + LZMA_PROPERTIES_SIZE);
'src' is aligned but LZMA_PROPERTIES_SIZE may refer to an unaligned address like
src+5, and using that as integer pointer may fail on platforms like ARM. Also
this will fail on systems using big-endian (outSize was encoded in
little-endian).
To fix this, reconstruct outSize in little-endian way.
Change-Id: If678e735cb270c3e5e29f36f1fad318096bf7d59
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: http://review.coreboot.org/2246
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/superio/ite/it8705f')
0 files changed, 0 insertions, 0 deletions