From: Florian Fainelli Date: Thu, 29 Mar 2007 22:19:26 +0000 (+0000) Subject: Fix myloader partition table parser X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d5bb3765cadbf33013a2f851bb12a373bbe6064b;p=librecmc%2Flibrecmc.git Fix myloader partition table parser SVN-Revision: 6757 --- diff --git a/target/linux/adm5120-2.6/files/drivers/mtd/myloader.c b/target/linux/adm5120-2.6/files/drivers/mtd/myloader.c index 023ae5c61f..ee916d7800 100644 --- a/target/linux/adm5120-2.6/files/drivers/mtd/myloader.c +++ b/target/linux/adm5120-2.6/files/drivers/mtd/myloader.c @@ -115,14 +115,14 @@ int parse_myloader_partitions(struct mtd_info *master, mtd_part = mtd_parts; names = (char *)&mtd_parts[num_parts]; - strcpy(NAME_MYLOADER, names); + strncpy(names, NAME_MYLOADER, NAME_LEN_MAX-1); mtd_part->name = names; mtd_part->offset = 0; mtd_part->size = blocklen; mtd_part++; names += NAME_LEN_MAX; - strcpy(NAME_PARTITION_TABLE, names); + strncpy(names, NAME_PARTITION_TABLE, NAME_LEN_MAX-1); mtd_part->name = names; mtd_part->offset = blocklen; mtd_part->size = blocklen;