Commit da53adad authored by Carl-Daniel Hailfinger's avatar Carl-Daniel Hailfinger
Browse files

Stop reading layout info when the max layout count has been reached


Corresponding to flashrom svn r1243.
Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
parent 204f465b
......@@ -152,6 +152,14 @@ int read_romlayout(char *name)
while (!feof(romlayout)) {
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))
continue;
#if 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment