pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/38166: crash in pkg_info



>Number:         38166
>Category:       pkg
>Synopsis:       crash in pkg_info
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 04 19:40:00 +0000 2008
>Originator:     David A. Holland <dholland%eecs.harvard.edu@localhost>
>Release:        NetBSD 4.99.54 (pkg_install 20080223)
>Organization:
>Environment:
System: NetBSD tanaqui 4.99.54 NetBSD 4.99.54 (TANAQUI) #21: Fri Feb 29 
12:31:31 EST 2008 dholland@tanaqui:/usr/src/sys/arch/i386/compile/TANAQUI i386
Architecture: i386
Machine: i386
>Description:

        Owing to some assorted lossage I ended up the other day with a
        package directory in /var/db/pkg that contained nothing but a
        core file.

        This arrangement of things causes pkg_info to dump core.

        (Which, if the nightly pkg_info run is enabled, causes a lot
        of muck in the results that needs to be waded through.)

>How-To-Repeat:

        mkdir /var/db/pkg/plonk-1.0
        pkg_info

>Fix:

Index: files/info/perform.c
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkg_install/files/info/perform.c,v
retrieving revision 1.44
diff -u -r1.44 perform.c
--- files/info/perform.c        22 Feb 2008 21:58:16 -0000      1.44
+++ files/info/perform.c        4 Mar 2008 19:28:48 -0000
@@ -390,7 +390,8 @@
                char    tmp[MaxPathSize];
 
                (void) snprintf(tmp, sizeof(tmp), "%-19s ", pkg);
-               show_index(meta->meta_comment, tmp);
+               show_index(meta->meta_comment ? meta->meta_comment : "???",
+                       tmp);
        } else if (Flags & SHOW_BI_VAR) {
                if (strcspn(BuildInfoVariable, "ABCDEFGHIJKLMNOPQRSTUVWXYZ")
                    == strlen(BuildInfoVariable))



Home | Main Index | Thread Index | Old Index