diff --git a/srcpkgs/xbps/patches/0001-xbps-rindex-sign-pubkey-buffer-must-be-kept-until-in.patch b/srcpkgs/xbps/patches/0001-xbps-rindex-sign-pubkey-buffer-must-be-kept-until-in.patch new file mode 100644 index 00000000000..dbf1ecf4b64 --- /dev/null +++ b/srcpkgs/xbps/patches/0001-xbps-rindex-sign-pubkey-buffer-must-be-kept-until-in.patch @@ -0,0 +1,43 @@ +From cbe05bd0f4a07c0fcd451c1dc2485bd35b7fb445 Mon Sep 17 00:00:00 2001 +From: Juan RP +Date: Thu, 6 Feb 2014 12:26:17 +0100 +Subject: [PATCH] xbps-rindex: [sign] pubkey buffer must be kept until + index-meta is externalized too. + +--- + bin/xbps-rindex/sign.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/bin/xbps-rindex/sign.c b/bin/xbps-rindex/sign.c +index 1939259..795ab15 100644 +--- a/bin/xbps-rindex/sign.c ++++ b/bin/xbps-rindex/sign.c +@@ -128,7 +128,7 @@ sign_repo(struct xbps_handle *xhp, const char *repodir, + unsigned int siglen; + uint16_t rpubkeysize, pubkeysize; + const char *arch, *pkgver, *rsignedby = NULL; +- char *binpkg, *binpkg_sig, *buf, *defprivkey; ++ char *binpkg, *binpkg_sig, *buf = NULL, *defprivkey; + int binpkg_fd, binpkg_sig_fd, rv = 0; + bool flush = false; + +@@ -265,7 +265,6 @@ sign_repo(struct xbps_handle *xhp, const char *repodir, + if (!xbps_data_equals(rpubkey, data)) + flush = true; + +- free(buf); + + pubkeysize = RSA_size(rsa) * 8; + xbps_dictionary_get_uint16(repo->idxmeta, "public-key-size", &rpubkeysize); +@@ -298,6 +297,8 @@ sign_repo(struct xbps_handle *xhp, const char *repodir, + out: + index_unlock(il); + ++ if (buf) ++ free(buf); + if (data) + xbps_object_release(data); + if (rsa) { +-- +1.8.5.3 + diff --git a/srcpkgs/xbps/template b/srcpkgs/xbps/template index 9b74c42f004..86646ef8819 100644 --- a/srcpkgs/xbps/template +++ b/srcpkgs/xbps/template @@ -1,7 +1,7 @@ # Template file for 'xbps' pkgname=xbps version=0.31 -revision=3 +revision=4 patch_args="-Np1" bootstrap=yes conf_files="/etc/xbps/xbps.conf"