* utilunix.c (canonicalize_pathname): Don't extend empty path

to "." - it can corrupt memory.
This commit is contained in:
Pavel Roskin 2002-07-26 21:51:16 +00:00
parent cb06231d26
commit 18c160fefa
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2002-07-26 Pavel Roskin <proski@gnu.org>
* utilunix.c (canonicalize_pathname): Don't extend empty path
to "." - it can corrupt memory.
* cmd.c (copymove_cmd_with_default): Remove, it's unused.
(copy_cmd_local): New function, copy within panel.
(ren_cmd_local): New function, rename within panel.

View File

@ -570,6 +570,9 @@ char *canonicalize_pathname (char *path)
int i, start;
char stub_char;
if (!*path)
return path;
stub_char = (*path == PATH_SEP) ? PATH_SEP : '.';
/* Walk along path looking for things to compact. */