Bug 192445 - pkg segfault when broken database
Summary: pkg segfault when broken database
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-pkg (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-06 15:57 UTC by gl00my
Modified: 2014-12-29 23:41 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gl00my 2014-08-06 15:57:36 UTC
pkg_jobs.c, pkg_jobs_check_remote_candidate
line 1216:

    while (pkgdb_it_next(it, &p, PKG_LOAD_BASIC) == EPKG_OK) {
        const char *rdigest;

        pkg_get(p, PKG_DIGEST, &rdigest);

        /* here it is, rdigest can be == NULL!!! */

        if (strcmp(rdigest, digest) != 0) /* here i got segfault, possible due the broken db */
             npkg ++;


pkg update -f solve the issue, but i think it is better, to show some warning, and not die :)
Comment 1 John Marino freebsd_committer freebsd_triage 2014-08-06 20:53:04 UTC
Over to maintainer group ....
Comment 2 Baptiste Daroussin freebsd_committer freebsd_triage 2014-12-29 23:41:05 UTC
This has been fixed since