pkgsrc-Bugs archive

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

pkg/42162: pkg_admin (pkg_install-20091006) dumps core



>Number:         42162
>Category:       pkg
>Synopsis:       pkg_admin (pkg_install-20091006) dumps core
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 08 17:20:00 +0000 2009
>Originator:     Ryo HAYASAKA
>Release:        NetBSD 5.99.19, pkgsrc-current
>Organization:
Japan Advanced Institute of Science and Technology (JAIST)
>Environment:
System: NetBSD bonnie.jaist.ac.jp 5.99.19 NetBSD 5.99.19 (GENERIC) #1: Fri Oct 
2 17:17:00 JST 2009 
root%bonnie.jaist.ac.jp@localhost:/f/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
pkg_admin (pkg_install-20091006) dumps core.
        
>How-To-Repeat:
make replace in pkgtools/pkg_install (pkg_install-20091006)
        
>Fix:
Index: main.c
===================================================================
RCS file: /usr/cvsup/src/external/bsd/pkg_install/dist/admin/main.c,v
retrieving revision 1.1.1.10
diff -d -p -u -r1.1.1.10 main.c
--- main.c      7 Oct 2009 13:19:40 -0000       1.1.1.10
+++ main.c      8 Oct 2009 17:13:15 -0000
@@ -145,11 +145,12 @@ add_pkg(const char *pkgdir, void *vp)
        char            file[MaxPathSize];
        char            dir[MaxPathSize];
        struct pkgdb_count *count;
+       struct pkgdb_count tmp;

        if (!pkgdb_open(ReadWrite))
                err(EXIT_FAILURE, "cannot open pkgdb");

-       count = vp;
+       count = (vp != NULL) ? vp : &tmp;
        ++count->packages;

        PkgDBDir = _pkgdb_getPKGDB_DIR();
        



Home | Main Index | Thread Index | Old Index