Use xrealpath
authorNelson Ferreira <nelson.ferreira@ieee.org>
Sat, 9 Jan 2016 22:51:27 +0000 (17:51 -0500)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Sat, 9 Jan 2016 22:59:34 +0000 (17:59 -0500)
* src/dired.c (dired_realpath): Use xrealpath for safety

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
src/dired.c

index 8cec22b..c0cd01e 100644 (file)
@@ -130,7 +130,7 @@ dired_realpath(const char *file)
 {
        char *result = xmalloc_atomic(4096);
 
-       if ( realpath(file, result) == NULL ) {
+       if ( xrealpath(file, result) == NULL ) {
                xfree(result);
                result = NULL;
        }