mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +02:00
Stop reading layout info when the max layout count has been reached
Corresponding to flashrom svn r1243. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
This commit is contained in:
parent
204f465bee
commit
da53adad31
8
layout.c
8
layout.c
@ -152,6 +152,14 @@ int read_romlayout(char *name)
|
|||||||
|
|
||||||
while (!feof(romlayout)) {
|
while (!feof(romlayout)) {
|
||||||
char *tstr1, *tstr2;
|
char *tstr1, *tstr2;
|
||||||
|
|
||||||
|
if (romimages >= MAX_ROMLAYOUT) {
|
||||||
|
msg_gerr("Maximum number of ROM images (%i) in layout "
|
||||||
|
"file reached before end of layout file.\n",
|
||||||
|
MAX_ROMLAYOUT);
|
||||||
|
msg_gerr("Ignoring the rest of the layout file.\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (2 != fscanf(romlayout, "%s %s\n", tempstr, rom_entries[romimages].name))
|
if (2 != fscanf(romlayout, "%s %s\n", tempstr, rom_entries[romimages].name))
|
||||||
continue;
|
continue;
|
||||||
#if 0
|
#if 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user