diff options
author | Dave Wallace <dwallacelf@gmail.com> | 2023-10-09 18:05:47 -0400 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2023-10-11 03:13:11 +0000 |
commit | 015a6f7f17c4c8a2c2dfc595c1b4dc52a6a18c89 (patch) | |
tree | 2bbe5cf6ac73befdeaf4b9aafefaabe84ec8e613 | |
parent | 471dc6b1e3ea53ed48d0727070c02fc9cc9da423 (diff) |
vppinfra: fix coverity issue CID 323952v23.10-rc2
Type: fix
Fixes: 08600ccfa
Change-Id: I53ba0d96507b55ab7cd735073d6c4cf20a3cc948
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 05cc62dd504bbb0fb230fcf3786ed7f4d5be2364)
-rw-r--r-- | src/vppinfra/unix-misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vppinfra/unix-misc.c b/src/vppinfra/unix-misc.c index 2918fc32328..6a7328bd873 100644 --- a/src/vppinfra/unix-misc.c +++ b/src/vppinfra/unix-misc.c @@ -148,11 +148,11 @@ clib_file_get_resolved_basename (char *fmt, ...) r = readlink ((char *) link, buffer, sizeof (buffer) - 1); vec_free (link); - buffer[r] = 0; if (r < 1) return 0; + buffer[r] = 0; p = buffer + r - 1; while (p > buffer && p[-1] != '/') p--; |