summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <patrick.mclean@sony.com>2018-12-05 13:56:11 -0800
committerPatrick McLean <chutzpah@gentoo.org>2018-12-05 13:56:39 -0800
commitc73313ba294602d3ec781bbfafc4c63b9e518062 (patch)
treecfb9ca652f6a741ee15a035a5c5159586f6cc868 /app-misc/jq
parentsys-kernel/gentoo-sources: Linux patch 4.19.7 (diff)
downloadgentoo-c73313ba294602d3ec781bbfafc4c63b9e518062.tar.gz
gentoo-c73313ba294602d3ec781bbfafc4c63b9e518062.tar.bz2
gentoo-c73313ba294602d3ec781bbfafc4c63b9e518062.zip
app-misc/jq: Revision bump, segfault fix with -ar params
Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'app-misc/jq')
-rw-r--r--app-misc/jq/files/jq-1.6-segfault-fix.patch22
-rw-r--r--app-misc/jq/jq-1.6-r1.ebuild (renamed from app-misc/jq/jq-1.6.ebuild)1
2 files changed, 23 insertions, 0 deletions
diff --git a/app-misc/jq/files/jq-1.6-segfault-fix.patch b/app-misc/jq/files/jq-1.6-segfault-fix.patch
new file mode 100644
index 000000000000..8eb7d456bc6b
--- /dev/null
+++ b/app-misc/jq/files/jq-1.6-segfault-fix.patch
@@ -0,0 +1,22 @@
+From a1f1231a73c221155d539a281181ef37f874869d Mon Sep 17 00:00:00 2001
+From: William Langford <wlangfor@gmail.com>
+Date: Tue, 20 Nov 2018 09:58:25 -0500
+Subject: [PATCH] Add missing jv_copy when printing with -ar
+
+---
+ src/main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/main.c b/src/main.c
+index b154689e..61ae43f9 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -168,7 +168,7 @@ static int process(jq_state *jq, jv value, int flags, int dumpopts) {
+ while (jv_is_valid(result = jq_next(jq))) {
+ if ((options & RAW_OUTPUT) && jv_get_kind(result) == JV_KIND_STRING) {
+ if (options & ASCII_OUTPUT) {
+- jv_dumpf(result, stdout, JV_PRINT_ASCII);
++ jv_dumpf(jv_copy(result), stdout, JV_PRINT_ASCII);
+ } else {
+ fwrite(jv_string_value(result), 1, jv_string_length_bytes(jv_copy(result)), stdout);
+ }
diff --git a/app-misc/jq/jq-1.6.ebuild b/app-misc/jq/jq-1.6-r1.ebuild
index 43d944791242..e5e7da47acac 100644
--- a/app-misc/jq/jq-1.6.ebuild
+++ b/app-misc/jq/jq-1.6-r1.ebuild
@@ -29,6 +29,7 @@ src_prepare() {
local PATCHES=(
"${FILESDIR}"/jq-1.6-never-bundle-oniguruma.patch
"${FILESDIR}"/jq-1.6-runpath.patch
+ "${FILESDIR}"/jq-1.6-segfault-fix.patch
)
use oniguruma || { sed -i 's:tests/onigtest::' Makefile.am || die; }
sed -i '/^dist_doc_DATA/d' Makefile.am || die