diff options
author | rillig <rillig> | 2007-09-11 13:46:10 +0000 |
---|---|---|
committer | rillig <rillig> | 2007-09-11 13:46:10 +0000 |
commit | cf9964a7ac251cfd34d2c4d154877cdb89ecccac (patch) | |
tree | a3227ef674f017127d67bf63304968f525e4b356 /pkgtools | |
parent | 3a82b16c0fa1764477f4b049a0f8ad431d0c09d0 (diff) | |
download | pkgsrc-cf9964a7ac251cfd34d2c4d154877cdb89ecccac.tar.gz |
Replaced undefined behavior with an error message. We don't expect
absolute paths in the PLIST anyway.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkg_install/files/add/extract.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pkgtools/pkg_install/files/add/extract.c b/pkgtools/pkg_install/files/add/extract.c index beb329869f7..9bfb3b678f6 100644 --- a/pkgtools/pkg_install/files/add/extract.c +++ b/pkgtools/pkg_install/files/add/extract.c @@ -1,4 +1,4 @@ -/* $NetBSD: extract.c,v 1.15 2007/04/16 12:55:35 joerg Exp $ */ +/* $NetBSD: extract.c,v 1.16 2007/09/11 13:46:10 rillig Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -14,7 +14,7 @@ #if 0 static const char *rcsid = "FreeBSD - Id: extract.c,v 1.17 1997/10/08 07:45:35 charnier Exp"; #else -__RCSID("$NetBSD: extract.c,v 1.15 2007/04/16 12:55:35 joerg Exp $"); +__RCSID("$NetBSD: extract.c,v 1.16 2007/09/11 13:46:10 rillig Exp $"); #endif #endif @@ -256,16 +256,15 @@ extract_plist(char *home, package_t *pkg) * that would probably affect too much code I prefer * not to touch - HF */ - char *s, t[MaxPathSize], *u; + char *s, t[MaxPathSize]; int rc; LFILE_ADD(&files, lfp, p->name); LFILE_ADD(&perms, lfp, p->name); if (p->name[0] == '/') - u = p->name; + errx(EXIT_FAILURE, "File names must not be absolute (%s).", p->name); else { (void) snprintf(t, sizeof(t), "%s/%s", Directory, p->name); - u = t; } s = pkgdb_retrieve(t); |