{
struct diskstat_info *dsi = CALLOC_STRUCT(diskstat_info);
- strcpy(dsi->name, name);
+ snprintf(dsi->name, sizeof(dsi->name), "%s", name);
snprintf(dsi->sysfs_filename, sizeof(dsi->sysfs_filename), "%s/%s/stat",
basename, name);
dsi->mode = objmode;
{
struct diskstat_info *dsi = CALLOC_STRUCT(diskstat_info);
- strcpy(dsi->name, name);
+ snprintf(dsi->name, sizeof(dsi->name), "%s", name);
snprintf(dsi->sysfs_filename, sizeof(dsi->sysfs_filename), "%s/stat",
basename);
dsi->mode = objmode;
memset(&stats, 0, sizeof(stats));
memset(&req, 0, sizeof(req));
- strcpy(req.ifr_name, nic->name);
+ snprintf(req.ifr_name, sizeof(req.ifr_name), "%s", nic->name);
req.u.data.pointer = &stats;
req.u.data.flags = 1;
req.u.data.length = sizeof(struct iw_statistics);
memset(&stats, 0, sizeof(stats));
memset(&req, 0, sizeof(req));
- strcpy(req.ifr_name, nic->name);
+ snprintf(req.ifr_name, sizeof(req.ifr_name), "%s", nic->name);
req.u.data.pointer = &stats;
req.u.data.flags = 1;
req.u.data.length = sizeof(struct iw_statistics);
sti->mode = mode;
sti->chip = (sensors_chip_name *) chip;
sti->feature = feature;
- strcpy(sti->chipname, chipname);
- strcpy(sti->featurename, featurename);
+ snprintf(sti->chipname, sizeof(sti->chipname), "%s", chipname);
+ snprintf(sti->featurename, sizeof(sti->featurename), "%s", featurename);
snprintf(sti->name, sizeof(sti->name), "%s.%s", sti->chipname,
sti->featurename);