coreboot-kgpe-d16/util/cbfstool
Hung-Te Lin 408aefd176 cbfstool: Fix crash on image without bootblock in end of ROM.
On platforms with CBFS data filling end of ROM image without bootblock in the
end (ex, ARM), calculation of "next valid entry" may exceed ROM image buffer in
memory and raise segmentation fault when we try to compare its magic value.

To fix this, always check if the entry address is inside ROM image buffer.

Verified to build and boot successfully on qemu/x86 and armv7/snow.

Change-Id: I117d6767a5403be636eea2b23be1dcf2e1c88839
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: http://review.coreboot.org/2330
Tested-by: build bot (Jenkins)
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2013-02-09 06:30:10 +01:00
..
lzma cbfstool: Update LZMA encoder to LZMA SDK 9.12 2012-11-12 18:35:52 +01:00
EXAMPLE cbfstool: Update example file. 2013-02-04 11:12:15 +01:00
Makefile cbfstool: Add cbfs_image new CBFS image manipulation API. 2013-02-05 22:25:02 +01:00
Makefile.inc cbfstool: Add cbfs_image new CBFS image manipulation API. 2013-02-05 22:25:02 +01:00
cbfs-mkpayload.c cbfstool: Add support for 64bit UEFI 2013-02-06 00:37:26 +01:00
cbfs-mkstage.c cbfstool: Use cbfs_image API for "add-*" (add-payload, add-stage, ...) commands. 2013-02-05 22:27:20 +01:00
cbfs.h cbfstool: Use cbfs_image API for "print" command. 2013-02-05 22:25:13 +01:00
cbfs_image.c cbfstool: Fix crash on image without bootblock in end of ROM. 2013-02-09 06:30:10 +01:00
cbfs_image.h cbfstool: Fix crash on image without bootblock in end of ROM. 2013-02-09 06:30:10 +01:00
cbfstool.c cbfstool: support parsing UEFI firmware volumes 2013-02-05 22:43:23 +01:00
coff.h cbfstool: Add support for 64bit UEFI 2013-02-06 00:37:26 +01:00
common.c cbfstool: Add buffer management API. 2013-02-05 22:24:45 +01:00
common.h cbfstool: support parsing UEFI firmware volumes 2013-02-05 22:43:23 +01:00
compress.c cbfstool: Add -v (verbose) output. 2013-02-01 05:54:24 +01:00
elf.h fix some wrong versions of the FSF's address (trivial) 2009-09-23 21:52:45 +00:00
fv.h cbfstool: support parsing UEFI firmware volumes 2013-02-05 22:43:23 +01:00
swab.h Various fixes to cbfstool. 2011-10-24 20:29:29 +02:00