diff options
-rw-r--r-- | lib/canonicalize.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/canonicalize.c b/lib/canonicalize.c index 4263c9de4..1eaefc508 100644 --- a/lib/canonicalize.c +++ b/lib/canonicalize.c @@ -159,6 +159,10 @@ canonicalize_file_name (const char *name) } free (extra_buf); + + /* NUL-terminate the resulting name. */ + resolved[resolved_len] = '\0'; + return resolved; #else /* !HAVE_RESOLVEPATH */ |