]> Zhao Yanbai Git Server - minix.git/commitdiff
dec21140A: resolve Coverity warnings
authorDavid van Moolenbroek <david@minix3.org>
Thu, 2 Aug 2012 16:53:01 +0000 (16:53 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Mon, 6 Aug 2012 16:18:33 +0000 (16:18 +0000)
drivers/dec21140A/dec21140A.c

index 608b1742cae457b078c1083c1abace5cec2f4e8c..c6edcf8ce383b517f3d82e728abea8086d5eca9d 100644 (file)
@@ -408,7 +408,7 @@ static void de_update_conf(dpeth_t * dep)
   char ec_key[16];
   long val;
 
-  strcpy(ec_key, "DEETH0");
+  strlcpy(ec_key, "DEETH0", sizeof(ec_key));
   ec_key[5] += de_instance;
 
   dep->de_mode = DEM_ENABLED;
@@ -559,7 +559,7 @@ static void de_conf_addr(dpeth_t * dep)
   int ix;
   long val;
 
-  strcpy(ea_key, "DEETH0_EA");
+  strlcpy(ea_key, "DEETH0_EA", sizeof(ea_key));
   ea_key[5] += de_instance;
 
   for (ix = 0; ix < SA_ADDR_LEN; ix++) {