return;
memset(&find, 0, sizeof(find));
- strcpy(find.name, name);
+ snprintf(find.name, sizeof(find.name), "%s", name);
pnhgc = hash_lookup(pbr_nhg_hash, &find);
if (!pnhgc) {
pbrms->reason |= PBR_MAP_INVALID_NO_NEXTHOPS;
memset(&find, 0, sizeof(find));
- strcpy(&find.name[0], pbrms->internal_nhg_name);
+ snprintf(find.name, sizeof(find.name), "%s", pbrms->internal_nhg_name);
pnhgc = hash_lookup(pbr_nhg_hash, &find);
nh = pbrms->nhg->nexthop;
return NULL;
}
- strcpy(lookup.name, name);
+ snprintf(lookup.name, sizeof(lookup.name), "%s", name);
pnhgc = hash_get(pbr_nhg_hash, &lookup, pbr_nhgc_alloc);
DEBUGD(&pbr_dbg_nht, "%s: Retrieved NHGC @ %p", __PRETTY_FUNCTION__,
pnhgc);
DEBUGD(&pbr_dbg_nht, "%s: %s", __PRETTY_FUNCTION__, name);
- strcpy(lookup.name, name);
+ snprintf(lookup.name, sizeof(lookup.name), "%s", name);
pnhgc = hash_get(pbr_nhg_hash, &lookup, NULL);
if (!pnhgc)
return false;
struct pbr_nexthop_group_cache *pnhgc;
memset(&find, 0, sizeof(find));
- strcpy(find.name, name);
+ snprintf(find.name, sizeof(find.name), "%s", name);
pnhgc = hash_lookup(pbr_nhg_hash, &find);
if (!pnhgc) {
struct pbr_nexthop_group_cache *pnhgc;
memset(&find, 0, sizeof(find));
- strcpy(find.name, name);
+ snprintf(find.name, sizeof(find.name), "%s", name);
pnhgc = hash_lookup(pbr_nhg_hash, &find);