Bug 205003 - ports-mgmt/pkg: pkg segfault if extra colon is in the url in repository configuration files
Summary: ports-mgmt/pkg: pkg segfault if extra colon is in the url in repository confi...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Many People
Assignee: Baptiste Daroussin
URL:
Keywords: crash, needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2015-12-04 00:59 UTC by Simpson
Modified: 2016-02-10 23:00 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (pkg)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simpson 2015-12-04 00:59:10 UTC
Example 1:

Note the ":" after the port number 80

root# cat FreeBSD.conf
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org:80:/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

root# pkg update
Updating FreeBSD repository catalogue...
Repository FreeBSD has a wrong packagesite, need to re-create database
Child process pid=78442 terminated abnormally: Segmentation fault

Example 2:

Note the 2nd ":" after the domain name

root# cat FreeBSD.conf
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org::/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

root# pkg update
Updating FreeBSD repository catalogue...
Repository FreeBSD has a wrong packagesite, need to re-create database
Child process pid=78475 terminated abnormally: Segmentation fault
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2016-01-24 22:12:35 UTC
I opened a pull request with a fix here: https://github.com/freebsd/pkg/pull/1379