coreboot-kgpe-d16/util/nvramtool
Andrew Engelbrecht e8905312f0 nvramtool: cmos_read(): Use malloc() instead of alloca()
Fixes crash occurring when 'nvramtool -a' tried to free a prematurely
freed pointer. (Tested on x60)

malloc() is correct because the pointer is accessed outside the calling
function. The pointer is freed in the parent function list_cmos_entry().

Change-Id: I1723f09740657f0f0d9e6954bd6d11c0a3820a42
Signed-off-by: Andrew Engelbrecht <sudoman@ninthfloor.org>
Reviewed-on: http://review.coreboot.org/7620
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2014-12-02 10:15:00 +01:00
..
accessors nvramtool: write size field more obviously 2013-11-19 00:59:55 +01:00
cli nvramtool: check for successful seek 2014-08-10 08:20:09 +02:00
COPYING
ChangeLog
DISCLAIMER
Makefile utils: Install man pages as non-executable (chmod 644) 2014-01-31 20:14:58 +01:00
Makefile.inc
README
cbfs.c nvramtool: Close file after use 2014-08-03 15:19:27 +02:00
cbfs.h
cmos_lowlevel.c nvramtool: cmos_read(): Use malloc() instead of alloca() 2014-12-02 10:15:00 +01:00
cmos_lowlevel.h
cmos_ops.c nvramtool: plug some memory leaks 2014-08-12 22:15:20 +02:00
cmos_ops.h
common.c
common.h
compute_ip_checksum.c
coreboot_tables.h
hexdump.c
hexdump.h
input_file.c
input_file.h
ip_checksum.h
layout.c
layout.h
lbtable.c
lbtable.h
nvramtool.spec
reg_expr.c
reg_expr.h
win32mmap.c

README

Summary of Operation
--------------------
nvramtool is a utility for reading/writing coreboot parameters and
displaying information from the coreboot table.  It is intended for x86-based
systems (both 32-bit and 64-bit) that use coreboot.

The coreboot table resides in low physical memory, and may be accessed
through the /dev/mem interface.  It is created at boot time by coreboot, and
contains various system information such as the type of mainboard in use.  It
specifies locations in the CMOS (nonvolatile RAM) where the coreboot
parameters are stored.

For information about coreboot, see http://www.coreboot.org/.

Ideas for Future Improvements
-----------------------------
1.  Move the core functionality of this program into a shared library.
2.  Consider adding options for displaying other BIOS-provided information
    such as the MP table, ACPI table, PCI IRQ routing table, etc.