diff options
author | Jim Meyering <jim@meyering.net> | 2003-04-10 17:03:26 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-04-10 17:03:26 +0000 |
commit | 31c3844239e6d47bd96e403ebda2d0e22d781adc (patch) | |
tree | 393365fc05e34fba1c067b7aaa5fb3f2fdda3aed | |
parent | e02387ea57f1addefa87ffbafb55d4e7ae738339 (diff) | |
download | coreutils-31c3844239e6d47bd96e403ebda2d0e22d781adc.tar.xz |
(canonicalize_file_name): NUL-terminate the result.
-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 */ |