[crossfire] Suspicious code

Nicolas Weeger nicolas.weeger at laposte.net
Fri Aug 12 08:53:00 CDT 2005


>
     
      * in common/readable.c, line 1647:
     
     >
     
      	op_name = strtok (formula->arch_name, ",");
     
     >
     
     
     >
     
      Trouble: arch_name is set through add_string, and strtok *changes* the
     
     >
     
      string.
     
     >
     
      Given the context it's used only when the 'arch' field of the recipe
     
     >
     
      contains , (recipe given multiple items randomly, i guess?). But this
     
     >
     
      could lead to formulae corruption.
     
     
Fixed, also fixed same issue in recipe.c (in formulae dumping code).

Nicolas

    
    


More information about the crossfire mailing list