cbfstool: Fix update-fit command
Regression in commit 3fcde22
caused parse_microcode_blob() to access
data outside cpu_microcode_blob.bin file in CBFS and create invalid
Intel Firmware Interface Table entries.
Change-Id: I1a687060084c2acd6cac5f5053b74a332b4ac714
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/7958
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
parent
78c622443e
commit
f9b8ed86dd
|
@ -207,8 +207,8 @@ static int parse_microcode_blob(struct cbfs_image *image,
|
||||||
uint32_t current_offset;
|
uint32_t current_offset;
|
||||||
uint32_t file_length;
|
uint32_t file_length;
|
||||||
|
|
||||||
current_offset = (int)((char *)mcode_file - image->buffer.data);
|
|
||||||
fit_header(mcode_file, ¤t_offset, &file_length);
|
fit_header(mcode_file, ¤t_offset, &file_length);
|
||||||
|
current_offset += (int)((char *)mcode_file - image->buffer.data);
|
||||||
|
|
||||||
num_mcus = 0;
|
num_mcus = 0;
|
||||||
while (file_length > sizeof(struct microcode_header))
|
while (file_length > sizeof(struct microcode_header))
|
||||||
|
|
Loading…
Reference in New Issue