diff options
author | agc <agc@pkgsrc.org> | 2011-01-31 07:22:15 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 2011-01-31 07:22:15 +0000 |
commit | 2414a1bf68e78ae0de7bdf7d03f5dbf21ec0eb43 (patch) | |
tree | 82dec14de5a0e9ebfc4ba043a95ce0ce6e6082b1 /pkgtools | |
parent | f1d0be826dd297940fdcecb6326dbe9bfe51b3ef (diff) | |
download | pkgsrc-2414a1bf68e78ae0de7bdf7d03f5dbf21ec0eb43.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); |