diff options
Diffstat (limited to 'src/vppinfra')
-rw-r--r-- | src/vppinfra/unix-misc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vppinfra/unix-misc.c b/src/vppinfra/unix-misc.c index 0c5d96c6bb7..2918fc32328 100644 --- a/src/vppinfra/unix-misc.c +++ b/src/vppinfra/unix-misc.c @@ -148,6 +148,7 @@ 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; @@ -159,6 +160,7 @@ clib_file_get_resolved_basename (char *fmt, ...) while (p[0]) vec_add1 (s, p++[0]); + vec_add1 (s, 0); return s; } |