There was a missing addition of the size of the .notes.pinfo
section header which could lead to corrupted malloc arena. Also, make cbfstool always build with debugging on. Performance is not an issue here. Don't strip it either. Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4641 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
b796a06cc6
commit
5a1af7b877
|
@ -2,6 +2,8 @@ obj ?= $(shell pwd)
|
||||||
|
|
||||||
HOSTCXX ?= g++
|
HOSTCXX ?= g++
|
||||||
HOSTCC ?= gcc
|
HOSTCC ?= gcc
|
||||||
|
CFLAGS ?= -g
|
||||||
|
|
||||||
|
|
||||||
BINARY:=$(obj)/cbfstool
|
BINARY:=$(obj)/cbfstool
|
||||||
|
|
||||||
|
|
|
@ -75,8 +75,10 @@ int parse_elf_to_payload(unsigned char *input, unsigned char **output,
|
||||||
|
|
||||||
name = (char *)(strtab + shdr[i].sh_name);
|
name = (char *)(strtab + shdr[i].sh_name);
|
||||||
|
|
||||||
if (!strcmp(name, ".note.pinfo"))
|
if (!strcmp(name, ".note.pinfo")) {
|
||||||
segments++;
|
segments++;
|
||||||
|
isize += (unsigned int)shdr[i].sh_size;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now, regular headers - we only care about PT_LOAD headers,
|
/* Now, regular headers - we only care about PT_LOAD headers,
|
||||||
|
|
Loading…
Reference in New Issue