mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-08 20:41:59 +03:00
* utilunix.c (canonicalize_pathname): Don't extend empty path
to "." - it can corrupt memory.
This commit is contained in:
parent
cb06231d26
commit
18c160fefa
@ -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.
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user