--- trunk/src/arcbios.c 2007/10/08 16:18:22 9 +++ trunk/src/arcbios.c 2007/10/08 16:18:27 10 @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: arcbios.c,v 1.103 2005/05/23 12:21:45 debug Exp $ + * $Id: arcbios.c,v 1.105 2005/06/26 11:36:27 debug Exp $ * * ARCBIOS emulation. */ @@ -2290,8 +2290,8 @@ #endif arcbios_putstring(cpu, " ARCBIOS emulation\n"); - sprintf(tmpstr, "%i cpu%s (%s), %i MB memory\n\n", - machine->ncpus, machine->ncpus > 1? "s" : "", + snprintf(tmpstr, sizeof(tmpstr), "%i cpu%s (%s), %i MB " + "memory\n\n", machine->ncpus, machine->ncpus > 1? "s" : "", cpu->cd.mips.cpu_type.name, machine->physical_ram_in_mb); arcbios_putstring(cpu, tmpstr); @@ -2445,7 +2445,7 @@ /* A very special case for IP24 (which identifies itself as an IP22): */ if (machine->machine_subtype == 24) - sprintf(name, "SGI-IP22"); + snprintf(name, alloclen, "SGI-IP22"); break; case MACHINE_ARC: /* ARC: */ @@ -2512,8 +2512,8 @@ if (arc_cpu_name[jj] >= 'a' && arc_cpu_name[jj] <= 'z') arc_cpu_name[jj] += ('A' - 'a'); - strcpy(arc_fpc_name, arc_cpu_name); - strcat(arc_fpc_name, "FPC"); + strlcpy(arc_fpc_name, arc_cpu_name, sizeof(arc_fpc_name)); + strlcat(arc_fpc_name, "FPC", sizeof(arc_fpc_name)); cpuaddr = arcbios_addchild_manual(cpu, COMPONENT_CLASS_ProcessorClass, COMPONENT_TYPE_CPU,