router->mlag_role = msg.my_role;
}
- strcpy(router->peerlink_rif, msg.peerlink_rif);
+ strlcpy(router->peerlink_rif, msg.peerlink_rif,
+ sizeof(router->peerlink_rif));
+
/* XXX - handle the case where we may rx the interface name from the
* MLAG daemon before we get the interface from zebra.
*/
char buf[48];
if (rp_info->rp_src == RP_SRC_STATIC)
- strcpy(source, "Static");
+ strlcpy(source, "Static", sizeof(source));
else if (rp_info->rp_src == RP_SRC_BSR)
- strcpy(source, "BSR");
+ strlcpy(source, "BSR", sizeof(source));
else
- strcpy(source, "None");
+ strlcpy(source, "None", sizeof(source));
if (uj) {
/*
* If we have moved on to a new RP then add the