pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install/files/add Pull over 1.117 from sr...
details: https://anonhg.NetBSD.org/pkgsrc/rev/794d2c1b48c2
branches: trunk
changeset: 510777:794d2c1b48c2
user: wiz <wiz%pkgsrc.org@localhost>
date: Tue Apr 04 06:24:39 2006 +0000
description:
Pull over 1.117 from src/usr.sbin:
revision 1.117
date: 2006/03/17 02:37:31; author: hubertf; state: Exp; lines: +6 -2
Add sanity check if there's a @cwd in the +CONTENT file.
If not abort, because we wouldn't know where to put the files.
Coverity CID 1358
diffstat:
pkgtools/pkg_install/files/add/perform.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 393ba1fa8d20 -r 794d2c1b48c2 pkgtools/pkg_install/files/add/perform.c
--- a/pkgtools/pkg_install/files/add/perform.c Tue Apr 04 06:13:11 2006 +0000
+++ b/pkgtools/pkg_install/files/add/perform.c Tue Apr 04 06:24:39 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.38 2006/03/13 22:08:22 erh Exp $ */
+/* $NetBSD: perform.c,v 1.39 2006/04/04 06:24:39 wiz Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -14,7 +14,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
#else
-__RCSID("$NetBSD: perform.c,v 1.38 2006/03/13 22:08:22 erh Exp $");
+__RCSID("$NetBSD: perform.c,v 1.39 2006/04/04 06:24:39 wiz Exp $");
#endif
#endif
@@ -500,6 +500,10 @@
*/
if (is_depoted_pkg) {
p = find_plist(&Plist, PLIST_CWD);
+ if (p == NULL) {
+ warn("no @cwd in +CONTENTS file?! aborting.");
+ goto bomb;
+ }
(void) strlcpy(dbdir, dirname_of(p->name), sizeof(dbdir));
(void) strlcpy(LogDir, p->name, sizeof(LogDir));
} else {
Home |
Main Index |
Thread Index |
Old Index