lib/selfboot: s_srcaddr is uninitialized.
s_srcaddr is uninitialized in the BSS section, leading to a garbage valued operand on the LHS of a '<' on line 383. Change-Id: Ie4fec91b09c70fb1d91ad3918ac3f60653fa1d83 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/5314 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
parent
2d5cec6401
commit
4bab5824e1
|
@ -263,6 +263,9 @@ static int build_self_segment_list(
|
|||
ntohl(segment->mem_len));
|
||||
new = malloc(sizeof(*new));
|
||||
new->s_filesz = 0;
|
||||
new->s_srcaddr = (uintptr_t)
|
||||
((unsigned char *)first_segment)
|
||||
+ ntohl(segment->offset);
|
||||
new->s_dstaddr = ntohll(segment->load_addr);
|
||||
new->s_memsz = ntohl(segment->mem_len);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue