freebsd-ports/ports-mgmt
Enji Cooper b2eb1410b4 Fix ports-mgmt/portfind string management/searching issues
Makefile:

  Bump `PORT_REVISION` for the change.

portfind.c:

  get_release(..):

  The function was incorrectly modifying a pointer that wasn't the original
  calloc'ed pointer, tripping asserts when MALLOC_PRODUCTION wasn't enabled
  in jemalloc [*].

  - Use one temporary buffer (`release`) instead of two (`release` and
    `version`).
  - Improve temporary memory idiom for managing memory used with
    sysctlbyname(3) by first checking the length, mallocing the buffer,
    then filling it with a second call to sysctlbyname(3).
  - Use strchr(3) instead of handrolling it in a while-loop and to
    avoid the improper free(3) of the memory allocated for `release`.

  main(..):

  - Use asprintf instead of calloc + sprintf.
  - Use constant `pasting` with `INDEX_FILE` instead of passing it in to
    asprintf(3).
  - Fix error message when unable to open `INDEX_FILE`.

Approved by: brd
Differential Revision: https://reviews.freebsd.org/D7198
PR: 211032 [*]
Reported by: Michael Zhilin <mizhka@gmail.com>
Reviewed by: Michael Zhilin <mizhka@gmail.com>
Sponsored by: EMC / Isilon Storage Division
2016-07-14 15:46:41 +00:00
..
chucky Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p. 2016-04-01 14:16:16 +00:00
dialog4ports ports-mgmt/dialog4ports: 0.1.5 -> 0.1.6 2016-07-12 18:03:44 +00:00
dialog4ports-static
distilator - Fix trailing whitespace in pkg-descrs, categories [p-x]* 2016-05-19 10:53:05 +00:00
fastest_sites
fbsdmon Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p. 2016-04-01 14:16:16 +00:00
freebsd-bugzilla-cli - Fix trailing whitespace in pkg-descrs, categories [p-x]* 2016-05-19 10:53:05 +00:00
genpatch
genplist - fix install target s/reinstall/stage/ 2016-02-14 22:29:56 +00:00
hs-porte
jailaudit
kpackagekit Remove expired misc/kdehier4 and update all of its consumers to not reference it any 2016-05-25 20:56:06 +00:00
lsknobs Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p. 2016-04-01 14:16:16 +00:00
managepkg Convert tab after WWW: in pkg-descrs to single space as per PHB 2016-05-23 18:36:52 +00:00
mkreadmes
octopkg Add patch (sent upstream) to prepare for the upcoming Qt 5.5.1 update. 2016-01-21 12:35:54 +00:00
p5-FreeBSD-Portindex Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p. 2016-04-01 14:16:16 +00:00
p5-FreeBSD-Ports
p5-FreeBSD-Ports-INDEXhash
packagekit Remove USE_SQLITE from bsd.databases.mk, replaced by USES=sqlite. 2016-04-25 16:13:38 +00:00
packagekit-qt4
pchecker - Update to 1.18 2015-12-24 11:36:20 +00:00
pkg Update to 1.8.7 2016-07-05 15:15:52 +00:00
pkg_cleanup
pkg_cutleaves Fix usage of ${PERL5}. 2015-12-17 17:19:48 +00:00
pkg_jail - update to 1.89 2016-03-19 11:00:57 +00:00
pkg_replace Update to version 20160411 2016-04-27 17:17:36 +00:00
pkg_rmleaves - Fix trailing whitespace in pkg-descrs, categories [p-x]* 2016-05-19 10:53:05 +00:00
pkg_search
pkg_tree Fix usage of ${PERL5}. 2015-12-17 17:19:48 +00:00
pkg-devel Update to 1.8.99.9: 2016-07-05 15:02:08 +00:00
pkg-plist Change MAINTAINER from ports@toco-domains.de to tz@FreeBSD.org 2016-06-10 09:08:02 +00:00
pkg-rmleaf
pkgcompare - Fix trailing whitespace in pkg-descrs, categories [p-x]* 2016-05-19 10:53:05 +00:00
pkgs_which
port-authoring-tools Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p. 2016-04-01 14:16:16 +00:00
port-maintenance-tools Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p. 2016-04-01 14:16:16 +00:00
portal many ports: mark broken on powerpc64 2016-04-21 16:43:14 +00:00
portconf
portdowngrade Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p. 2016-04-01 14:16:16 +00:00
portell - Fix WWW link 2016-05-23 08:21:21 +00:00
portest ports-mgmt/portest: 0.1.6 -> 0.1.7 2016-05-08 20:52:21 +00:00
portfind Fix ports-mgmt/portfind string management/searching issues 2016-07-14 15:46:41 +00:00
portless Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p. 2016-04-01 14:16:16 +00:00
portlint Update to 2.17.3. 2016-07-07 17:42:25 +00:00
portmaster Change MAINTAINER from ports@toco-domains.de to tz@FreeBSD.org 2016-06-10 09:08:02 +00:00
portrac Fix build on FreeBSD 9. 2016-01-23 14:31:10 +00:00
portscout Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p. 2016-04-01 14:16:16 +00:00
portsearch
portshaker Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p. 2016-04-01 14:16:16 +00:00
portshaker-config Convert to @sample 2016-04-10 09:41:20 +00:00
portsreinstall
porttools Update WWW: 2016-05-30 19:48:45 +00:00
porttree - Fix trailing whitespace in pkg-descrs, categories [p-x]* 2016-05-19 10:53:05 +00:00
portupdate-scan
portupgrade Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p. 2016-04-01 14:16:16 +00:00
portupgrade-devel Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p. 2016-04-01 14:16:16 +00:00
poudriere Move the release MANIFESTS to misc/freebsd-release-manifests. 2016-06-29 23:37:51 +00:00
poudriere-devel Move the release MANIFESTS to misc/freebsd-release-manifests. 2016-06-29 23:37:51 +00:00
psearch
py-pytoport Ignore on the package builders 2016-06-04 15:48:55 +00:00
py-skog Bump minimal python3 version to 3.3 in USES 2016-02-02 20:01:44 +00:00
redports-node Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p. 2016-04-01 14:16:16 +00:00
symports
synth ports-mgmt/synth: Upgrade version 1.40 => 1.41 2016-06-20 16:57:28 +00:00
tinderbox Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p. 2016-04-01 14:16:16 +00:00
wanted-ports Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p. 2016-04-01 14:16:16 +00:00
xps - Drop maintainership and deprecate: does not work with pkg(8) 2016-07-11 15:37:45 +00:00
Makefile New port: ports-mgmt/portest 2016-03-08 17:49:44 +00:00