From 19a11d6fe9593e585aff8a5787d25e38faa3d88c Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 13 Mar 2014 08:52:17 -0500 Subject: cbfstool: remove incorrect section size check I was overzealous in checking the section size with respect to the file size. That check makes no sense as the section only deals with link sizes -- not on-disk sizes. Remove the check as it doesn't make any sense. Change-Id: I348e7847ae3a50badc22693439614f813462445a Signed-off-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/5384 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones --- util/cbfstool/elfheaders.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'util/cbfstool/elfheaders.c') diff --git a/util/cbfstool/elfheaders.c b/util/cbfstool/elfheaders.c index 505af78aa9..03d8e7d68c 100644 --- a/util/cbfstool/elfheaders.c +++ b/util/cbfstool/elfheaders.c @@ -306,11 +306,6 @@ shdr_read(const struct buffer *in, Elf64_Ehdr *ehdr, struct xdr *xdr, int bit64) for (i = 0; i < ehdr->e_shnum; i++) { DEBUG("Parsing section %d\n", i); elf_shdr(&b, &shdr[i], ehdr->e_shentsize, xdr, bit64); - - /* Ensure the contents are valid within the elf file. */ - if (check_size(in, shdr[i].sh_offset, shdr[i].sh_size, - "section contents")) - return NULL; } return shdr; -- cgit v1.2.3