Author: hailfinger Date: Sat Dec 4 12:56:52 2010 New Revision: 1243 URL: http://flashrom.org/trac/flashrom/changeset/1243
Log: Stop reading layout info when the max layout count has been reached. Signed-off-by: Carl-Daniel Hailfinger <[email protected]> Acked-by: Uwe Hermann <[email protected]> Modified: trunk/layout.c Modified: trunk/layout.c ============================================================================== --- trunk/layout.c Sat Dec 4 04:26:40 2010 (r1242) +++ trunk/layout.c Sat Dec 4 12:56:52 2010 (r1243) @@ -152,6 +152,14 @@ 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 _______________________________________________ flashrom mailing list [email protected] http://www.flashrom.org/mailman/listinfo/flashrom
