summaryrefslogtreecommitdiff
path: root/target/linux/adm5120-2.6/files/drivers
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-03-29 22:19:26 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-03-29 22:19:26 +0000
commitd5bb3765cadbf33013a2f851bb12a373bbe6064b (patch)
tree6c06f9176430e1e746296c4ee293b441b826d26c /target/linux/adm5120-2.6/files/drivers
parentf5b93badec3a9c16dbae0cab8496cee9b0a73071 (diff)
downloadmtk-20170518-d5bb3765cadbf33013a2f851bb12a373bbe6064b.zip
mtk-20170518-d5bb3765cadbf33013a2f851bb12a373bbe6064b.tar.gz
mtk-20170518-d5bb3765cadbf33013a2f851bb12a373bbe6064b.tar.bz2
Fix myloader partition table parser
SVN-Revision: 6757
Diffstat (limited to 'target/linux/adm5120-2.6/files/drivers')
-rw-r--r--target/linux/adm5120-2.6/files/drivers/mtd/myloader.c4
1 files changed, 2 insertions, 2 deletions
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 023ae5c..ee916d7 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;