summaryrefslogtreecommitdiff
path: root/util/romcc/tests/simple_test82.c
diff options
context:
space:
mode:
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>2013-12-08 17:46:40 -0600
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2013-12-09 17:34:25 +0100
commitf87c20a00dca412ad8fa255ef38fd954762afa4b (patch)
treed2652e1d287cc51f02f7831c97a789f569eeb534 /util/romcc/tests/simple_test82.c
parent691b313c2807a5e9d293e9a520f951ea1319bb8f (diff)
cbfstool: Properly handle EOF in update_fit step
During the update_fit step, 'file_length' is used to determine how many bytes are left in the CBFS file. It was decremented in a loop from an array 'mcus[num_mcus].size', but 'num_mcus' was incremented right before. Since 'mcus' is memset(0) externally, 'file_length' was never decremented. The loop exited when it reached a dummy terminator, usually 48 bytes of 0 which are internationally added to microcode blobs in coreboot. However, if that terminator is removed, the loop doesn't stop and continues until it segfaults. Change-Id: I840727add69379ffef75b694d90402ed89769e3b Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-on: http://review.coreboot.org/4508 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
Diffstat (limited to 'util/romcc/tests/simple_test82.c')
0 files changed, 0 insertions, 0 deletions