[coreboot] Patch merged into coreboot/master: d51557a lib: Prevent unaligned memory access and fix endianess in LZMA decode library.

gerrit at coreboot.org gerrit at coreboot.org
Fri Feb 1 06:15:50 CET 2013


the following patch was just integrated into master:
commit d51557ade2a9f29cbb4e0f38d5a4920b42486168
Author: Hung-Te Lin <hungte at chromium.org>
Date:   Thu Jan 31 12:14:46 2013 +0800

    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 at chromium.org>
    Reviewed-on: http://review.coreboot.org/2246
    Tested-by: build bot (Jenkins)
    Reviewed-by: Ronald G. Minnich <rminnich at gmail.com>

Build-Tested: build bot (Jenkins) at Fri Feb  1 05:57:55 2013, giving +1
Reviewed-By: Ronald G. Minnich <rminnich at gmail.com> at Fri Feb  1 06:15:49 2013, giving +2
See http://review.coreboot.org/2246 for details.

-gerrit



More information about the coreboot mailing list