summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/alpm.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-03-29 19:18:59 +0200
committerAurelien Foret <aurelien@archlinux.org>2005-03-29 19:18:59 +0200
commit6063424c82f18f3ea8bbf9a92fd30b349ec778bd (patch)
tree398d20c2637ddf5a44ddcfbeacb449c256e71c18 /lib/libalpm/alpm.c
parent3ac94cc71905535252db84f8a0c26a4f59d8162c (diff)
downloadpacman-6063424c82f18f3ea8bbf9a92fd30b349ec778bd.tar.gz
pacman-6063424c82f18f3ea8bbf9a92fd30b349ec778bd.tar.xz
Replaced snprintf calls by the SNPRINTF macro to avoid buffer overflows when copying strings
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r--lib/libalpm/alpm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index b7987e9d..da879569 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -74,7 +74,7 @@ int alpm_initialize(char *root)
}
}
- strncpy(str, (root) ? root : PM_ROOT, PATH_MAX);
+ STRNCPY(str, (root) ? root : PM_ROOT, PATH_MAX);
/* add a trailing '/' if there isn't one */
if(str[strlen(str)-1] != '/') {
strcat(str, "/");