diff options
author | Dave Barach <dave@barachs.net> | 2020-04-04 18:34:41 -0400 |
---|---|---|
committer | Dave Barach <dave@barachs.net> | 2020-04-04 18:37:01 -0400 |
commit | 0250090fc0c24214cb1fa969f6e2f585099ee36b (patch) | |
tree | 7fd794527aea622f109613d168fc8fc418589eb0 /src/vcl/ldp.c | |
parent | 9f86d225ab4f3dccbf61383a75d6af7d321a204e (diff) |
misc: strcpy be gone
Causes static analysis "vulnerability" warnings
Type: fix
Ticket: VPP-1837
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I272fa69251d70f62178e6dff0423c16f99937af1
Diffstat (limited to 'src/vcl/ldp.c')
-rw-r--r-- | src/vcl/ldp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c index 0dbc6a51efc..66c6d938df6 100644 --- a/src/vcl/ldp.c +++ b/src/vcl/ldp.c @@ -1814,8 +1814,8 @@ getsockopt (int fd, int level, int optname, rv = -EFAULT; break; case TCP_CONGESTION: - strcpy (optval, "cubic"); *optlen = strlen ("cubic"); + strncpy (optval, "cubic", *optlen + 1); rv = 0; break; default: |