diff options
author | agc <agc> | 2011-01-31 07:22:15 +0000 |
---|---|---|
committer | agc <agc> | 2011-01-31 07:22:15 +0000 |
commit | dc0a005f590f3797bf0166f33f8a3d26677612d9 (patch) | |
tree | 82dec14de5a0e9ebfc4ba043a95ce0ce6e6082b1 /pkgtools | |
parent | 4a189a447e9093722e4e2154677681b8f6922d9f (diff) | |
download | pkgsrc-dc0a005f590f3797bf0166f33f8a3d26677612d9.tar.gz |
Protect against de-referencing a pointer which might be NULL.
Fixes PR pkg/44476 from Uwe Klaus
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkg_install/files/info/show.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgtools/pkg_install/files/info/show.c b/pkgtools/pkg_install/files/info/show.c index d491f76bdfc..eb7b4df6777 100644 --- a/pkgtools/pkg_install/files/info/show.c +++ b/pkgtools/pkg_install/files/info/show.c @@ -1,4 +1,4 @@ -/* $NetBSD: show.c,v 1.31 2010/11/22 09:00:12 joerg Exp $ */ +/* $NetBSD: show.c,v 1.32 2011/01/31 07:22:15 agc Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -7,7 +7,7 @@ #if HAVE_SYS_CDEFS_H #include <sys/cdefs.h> #endif -__RCSID("$NetBSD: show.c,v 1.31 2010/11/22 09:00:12 joerg Exp $"); +__RCSID("$NetBSD: show.c,v 1.32 2011/01/31 07:22:15 agc Exp $"); /* * FreeBSD install - a package for the installation and maintainance @@ -194,7 +194,8 @@ show_plist(const char *title, package_t *plist, pl_ent_t type) case PLIST_PKGCFL: case PLIST_BLDDEP: case PLIST_PKGDIR: - printf(Quiet ? showv[p->type].sh_quiet : showv[p->type].sh_verbose, p->name); + printf(Quiet ? showv[p->type].sh_quiet : showv[p->type].sh_verbose, + (p->name) ? p->name : "(null)"); break; default: warnx("unknown command type %d (%s)", p->type, p->name); |