diff --git a/srcpkgs/xbps/patches/0001-lib-transaction_commit.c-fix-a-double-free-reported-.patch b/srcpkgs/xbps/patches/0001-lib-transaction_commit.c-fix-a-double-free-reported-.patch new file mode 100644 index 0000000000..98c79377e8 --- /dev/null +++ b/srcpkgs/xbps/patches/0001-lib-transaction_commit.c-fix-a-double-free-reported-.patch @@ -0,0 +1,35 @@ +From fb5fb91fa3847ebecd67940bad30f045f5d02dc5 Mon Sep 17 00:00:00 2001 +From: Juan RP +Date: Tue, 28 Jan 2014 20:51:57 +0100 +Subject: [PATCH] lib/transaction_commit.c: fix a double free (reported by + Hanspolo). + +--- + lib/transaction_commit.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/lib/transaction_commit.c b/lib/transaction_commit.c +index 8c0f8db..8030863 100644 +--- a/lib/transaction_commit.c ++++ b/lib/transaction_commit.c +@@ -166,6 +166,7 @@ download_binpkgs(struct xbps_handle *xhp, xbps_object_iterator_t iter) + */ + sigfile = xbps_xasprintf("%s.sig", file); + free(file); ++ file = NULL; + if (access(sigfile, R_OK) == -1) { + xbps_set_cb_state(xhp, XBPS_STATE_DOWNLOAD, 0, pkgver, + "Downloading `%s' signature (from `%s')...", pkgver, repoloc); +@@ -182,7 +183,8 @@ download_binpkgs(struct xbps_handle *xhp, xbps_object_iterator_t iter) + } + } + free(sigfile); +- free(file); ++ if (file != NULL) ++ free(file); + } + xbps_object_iterator_reset(iter); + +-- +1.8.5.3 + diff --git a/srcpkgs/xbps/template b/srcpkgs/xbps/template index 798336be6d..0ab0331e2a 100644 --- a/srcpkgs/xbps/template +++ b/srcpkgs/xbps/template @@ -1,7 +1,8 @@ # Template file for 'xbps' pkgname=xbps version=0.30 -revision=1 +revision=2 +patch_args="-Np1" bootstrap=yes conf_files="/etc/xbps/xbps.conf" replaces="xbps>=0"