diff options
author | Donald Sharp <sharpd@nvidia.com> | 2022-05-07 03:05:38 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2022-05-07 03:05:38 +0200 |
commit | a976aa3cea5228109faaf006ef1abc30df39c1e1 (patch) | |
tree | 856dd11524a07e8c170edeb04d6ce73c4d60de88 /isisd/isis_te.c | |
parent | *: Fix doesnt spelling mistakes (diff) | |
download | frr-a976aa3cea5228109faaf006ef1abc30df39c1e1.tar.xz frr-a976aa3cea5228109faaf006ef1abc30df39c1e1.zip |
isisd: Fix read past end of string
using a memcpy for a strdup'ed string. bad mojo
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'isisd/isis_te.c')
-rw-r--r-- | isisd/isis_te.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/isisd/isis_te.c b/isisd/isis_te.c index 1a1e0dc29..924922339 100644 --- a/isisd/isis_te.c +++ b/isisd/isis_te.c @@ -439,7 +439,7 @@ static struct ls_vertex *lsp_to_vertex(struct ls_ted *ted, struct isis_lsp *lsp) SET_FLAG(lnode.flags, LS_NODE_ROUTER_ID6); } if (tlvs->hostname) { - memcpy(&lnode.name, tlvs->hostname, MAX_NAME_LENGTH); + strlcpy(lnode.name, tlvs->hostname, MAX_NAME_LENGTH); SET_FLAG(lnode.flags, LS_NODE_NAME); } if (tlvs->router_cap) { |