Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/handle.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/handle.c')
-rw-r--r--lib/libalpm/handle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index 80ad5601..730372a7 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -328,7 +328,7 @@ enum _pmerrno_t _alpm_set_directory_option(const char *value,
if(stat(path, &st) == -1 || !S_ISDIR(st.st_mode)) {
return PM_ERR_NOT_A_DIR;
}
- real = calloc(PATH_MAX + 1, sizeof(char));
+ real = calloc(PATH_MAX, sizeof(char));
if(!realpath(path, real)) {
free(real);
return PM_ERR_NOT_A_DIR;