summaryrefslogtreecommitdiff
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-03-29 17:18:59 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-03-29 17:18:59 +0000
commit6063424c82f18f3ea8bbf9a92fd30b349ec778bd (patch)
tree398d20c2637ddf5a44ddcfbeacb449c256e71c18 /lib/libalpm/util.c
parent3ac94cc71905535252db84f8a0c26a4f59d8162c (diff)
downloadpacman-6063424c82f18f3ea8bbf9a92fd30b349ec778bd.tar.xz
Replaced snprintf calls by the SNPRINTF macro to avoid buffer overflows when copying strings
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 9e689685..73fed49f 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -378,7 +378,7 @@ int _alpm_runscriptlet(char *root, char *installfn, char *script, char *ver, cha
scriptpath = scriptfn + strlen(root) - 1;
return(0);
} else {
- strncpy(scriptfn, installfn, PATH_MAX-1);
+ STRNCPY(scriptfn, installfn, PATH_MAX);
/* chop off the root so we can find the tmpdir in the chroot */
scriptpath = scriptfn + strlen(root) - 1;
}