aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 472676dd550e..bfa9a6a951dd 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -455,7 +455,7 @@ static int netdev_boot_setup_add(char *name, struct ifmap *map)
455 for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) { 455 for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) {
456 if (s[i].name[0] == '\0' || s[i].name[0] == ' ') { 456 if (s[i].name[0] == '\0' || s[i].name[0] == ' ') {
457 memset(s[i].name, 0, sizeof(s[i].name)); 457 memset(s[i].name, 0, sizeof(s[i].name));
458 strcpy(s[i].name, name); 458 strlcpy(s[i].name, name, IFNAMSIZ);
459 memcpy(&s[i].map, map, sizeof(s[i].map)); 459 memcpy(&s[i].map, map, sizeof(s[i].map));
460 break; 460 break;
461 } 461 }
@@ -480,7 +480,7 @@ int netdev_boot_setup_check(struct net_device *dev)
480 480
481 for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) { 481 for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) {
482 if (s[i].name[0] != '\0' && s[i].name[0] != ' ' && 482 if (s[i].name[0] != '\0' && s[i].name[0] != ' ' &&
483 !strncmp(dev->name, s[i].name, strlen(s[i].name))) { 483 !strcmp(dev->name, s[i].name)) {
484 dev->irq = s[i].map.irq; 484 dev->irq = s[i].map.irq;
485 dev->base_addr = s[i].map.base_addr; 485 dev->base_addr = s[i].map.base_addr;
486 dev->mem_start = s[i].map.mem_start; 486 dev->mem_start = s[i].map.mem_start;