index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | lib/libalpm/handle.c | 7 |
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 5cbb0157..4c18943a 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -285,10 +285,9 @@ int SYMEXPORT alpm_option_set_root(const char *root) pm_errno = PM_ERR_NOT_A_DIR; return(-1); } - /* According to the man page, realpath is safe to use IFF the second arg is - * NULL. */ - realroot = realpath(root, NULL); - if(!realroot) { + + realroot = calloc(PATH_MAX+1, sizeof(char)); + if(!realpath(root, realroot)) { pm_errno = PM_ERR_NOT_A_DIR; return(-1); } |