[coreboot] #102: flashrom: coreboot ROM image file identification heuristic is broken

coreboot svn at coreboot.org
Fri Jul 4 15:05:23 CEST 2008


#102: flashrom: coreboot ROM image file identification heuristic is broken
-------------------------+--------------------------------------------------
    Reporter:  stuge     |         Owner:  somebody           
        Type:  defect    |        Status:  reopened           
    Priority:  major     |     Milestone:  flashrom v1.0      
   Component:  flashrom  |       Version:                     
  Resolution:            |      Keywords:  rom image heuristic
Dependencies:            |   Patchstatus:  there is no patch  
-------------------------+--------------------------------------------------

Comment(by anonymous):

 Is this what the author possibly meant?

 {{{
 Index: layout.c
 ===================================================================
 --- layout.c    (revision 3412)
 +++ layout.c    (working copy)
 @@ -65,9 +65,9 @@
          */
         if ((*walk) == 0 || ((*walk) & 0x3ff) != 0 || *walk > size ||
                 *(walk - 1) > size || *(walk - 2) > size ||
 -               (!isprint((const char *)(bios + size - *(walk - 1))) &&
 +               (!isprint(*(const char *)(bios + size - *(walk - 1))) &&
                 ((const char *)(bios + size - *(walk - 1)))) ||
 -               (!isprint((const char *)(bios + size - *(walk - 2))) &&
 +               (!isprint(*(const char *)(bios + size - *(walk - 2))) &&
                 ((const char *)(bios + size - *(walk - 2))))) {
                 printf("Flash image seems to be a legacy BIOS. Disabling
 checks.\n");
                 mainboard_vendor = def_name;
 }}}

 Was this code ever tested or reviewed? It obviously never worked like
 that.

-- 
Ticket URL: <http://tracker.coreboot.org/trac/coreboot/ticket/102#comment:6>
coreboot <http://www.coreboot.org/>



More information about the coreboot mailing list