summaryrefslogtreecommitdiffstats
path: root/src/vcl
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-04-04 18:34:41 -0400
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-13 17:20:47 +0000
commit3d57cfdfb529c61fa5ec6e8a04db4ef042e7eb45 (patch)
tree147a67aa183dd1f961c2dd56b926c447e43f198b /src/vcl
parentd13034a6d1a239af07948ebe6a399c6aec5ddbbc (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 (cherry picked from commit 0250090fc0c24214cb1fa969f6e2f585099ee36b)
Diffstat (limited to 'src/vcl')
-rw-r--r--src/vcl/ldp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index 3944239ec1a..af9742063fa 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -1813,8 +1813,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: