From 2dfe5a077573b76ed7f03d5d91c78682854c976c Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Mon, 6 May 2019 21:30:10 +0000 Subject: [PATCH] staticd: strcpy -> strlcpy Signed-off-by: Quentin Young --- staticd/static_routes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staticd/static_routes.c b/staticd/static_routes.c index cde31df14f..5f9ecad694 100644 --- a/staticd/static_routes.c +++ b/staticd/static_routes.c @@ -127,7 +127,7 @@ int static_add_route(afi_t afi, safi_t safi, uint8_t type, struct prefix *p, si->tag = tag; si->vrf_id = svrf->vrf->vrf_id; si->nh_vrf_id = nh_svrf->vrf->vrf_id; - strcpy(si->nh_vrfname, nh_svrf->vrf->name); + strlcpy(si->nh_vrfname, nh_svrf->vrf->name, sizeof(si->nh_vrfname)); si->table_id = table_id; si->onlink = onlink; -- 2.39.5