summaryrefslogtreecommitdiff
path: root/app-misc/jq/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-misc/jq/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-misc/jq/files')
-rw-r--r--app-misc/jq/files/jq-1.5-dynamic-link.patch13
-rw-r--r--app-misc/jq/files/jq-1.5-heap_buffer_overflow_in_tokenadd.patch34
-rw-r--r--app-misc/jq/files/jq-1.5-remove-automagic-dep-on-oniguruma.patch58
3 files changed, 105 insertions, 0 deletions
diff --git a/app-misc/jq/files/jq-1.5-dynamic-link.patch b/app-misc/jq/files/jq-1.5-dynamic-link.patch
new file mode 100644
index 000000000000..dbc2f11acb7f
--- /dev/null
+++ b/app-misc/jq/files/jq-1.5-dynamic-link.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.am b/Makefile.am
+index c3a771f..274c01e 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -84,7 +84,7 @@ main.c: version.h
+
+ bin_PROGRAMS = jq
+ jq_SOURCES = main.c version.h
+-jq_LDFLAGS = -static-libtool-libs
++jq_LDFLAGS =
+ jq_LDADD = libjq.la -lm
+
+ if ENABLE_ALL_STATIC
diff --git a/app-misc/jq/files/jq-1.5-heap_buffer_overflow_in_tokenadd.patch b/app-misc/jq/files/jq-1.5-heap_buffer_overflow_in_tokenadd.patch
new file mode 100644
index 000000000000..edb07d8388b5
--- /dev/null
+++ b/app-misc/jq/files/jq-1.5-heap_buffer_overflow_in_tokenadd.patch
@@ -0,0 +1,34 @@
+From 8eb1367ca44e772963e704a700ef72ae2e12babd Mon Sep 17 00:00:00 2001
+From: Nicolas Williams <nico@cryptonector.com>
+Date: Sat, 24 Oct 2015 17:24:57 -0500
+Subject: [PATCH] Heap buffer overflow in tokenadd() (fix #105)
+
+This was an off-by one: the NUL terminator byte was not allocated on
+resize. This was triggered by JSON-encoded numbers longer than 256
+bytes.
+---
+ src/jv_parse.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/jv_parse.c b/src/jv_parse.c
+index 3102ed4..84245b8 100644
+--- a/jv_parse.c
++++ b/jv_parse.c
+@@ -383,7 +383,7 @@ static pfunc stream_token(struct jv_parser* p, char ch) {
+
+ static void tokenadd(struct jv_parser* p, char c) {
+ assert(p->tokenpos <= p->tokenlen);
+- if (p->tokenpos == p->tokenlen) {
++ if (p->tokenpos >= (p->tokenlen - 1)) {
+ p->tokenlen = p->tokenlen*2 + 256;
+ p->tokenbuf = jv_mem_realloc(p->tokenbuf, p->tokenlen);
+ }
+@@ -485,7 +485,7 @@ static pfunc check_literal(struct jv_parser* p) {
+ TRY(value(p, v));
+ } else {
+ // FIXME: better parser
+- p->tokenbuf[p->tokenpos] = 0; // FIXME: invalid
++ p->tokenbuf[p->tokenpos] = 0;
+ char* end = 0;
+ double d = jvp_strtod(&p->dtoa, p->tokenbuf, &end);
+ if (end == 0 || *end != 0)
diff --git a/app-misc/jq/files/jq-1.5-remove-automagic-dep-on-oniguruma.patch b/app-misc/jq/files/jq-1.5-remove-automagic-dep-on-oniguruma.patch
new file mode 100644
index 000000000000..95ba0e058056
--- /dev/null
+++ b/app-misc/jq/files/jq-1.5-remove-automagic-dep-on-oniguruma.patch
@@ -0,0 +1,58 @@
+commit 18b4b18b41f5ed396d73449ce8d6ec408d95d6b2
+Author: David Tolnay <dtolnay@gmail.com>
+Date: Sat Nov 21 10:05:37 2015 -0800
+
+ Support --without-oniguruma
+
+diff --git a/configure.ac b/configure.ac
+index 9e2c8cf..7f6be34 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -52,27 +52,26 @@ fi
+ AC_ARG_WITH([oniguruma],
+ [AS_HELP_STRING([--with-oniguruma=prefix],
+ [try this for a non-standard install prefix of the oniguruma library])],
+- [ONIGURUMAPATHSET=1],
+- [ONIGURUMAPATHSET=0])
+-
+-if test $ONIGURUMAPATHSET = 1; then
+- CFLAGS="$CFLAGS -I${with_oniguruma}/include"
+- LDFLAGS="$LDFLAGS -L${with_oniguruma}/lib"
+-fi
+-
+-# check for ONIGURUMA library
+-HAVE_ONIGURUMA=0
+-AC_CHECK_HEADER("oniguruma.h",
+- AC_CHECK_LIB([onig],[onig_version],[LIBS="$LIBS -lonig"; HAVE_ONIGURUMA=1;]))
+-
+-# handle check results
+-if test $HAVE_ONIGURUMA != 1; then
+- AC_MSG_NOTICE([Oniguruma was not found.])
+- AC_MSG_NOTICE([ Try setting the location using '--with-oniguruma=PREFIX' ])
+-else
+- AC_DEFINE([HAVE_ONIGURUMA],1,[Define to 1 if Oniguruma is installed])
+-fi
+-
++ [],
++ [with_oniguruma=yes])
++
++AS_IF([test "x$with_oniguruma" != xno], [
++ AS_IF([test "x$with_oniguruma" != xyes], [
++ CFLAGS="$CFLAGS -I${with_oniguruma}/include"
++ LDFLAGS="$LDFLAGS -L${with_oniguruma}/lib"
++ ])
++ # check for ONIGURUMA library
++ have_oniguruma=0
++ AC_CHECK_HEADER("oniguruma.h",
++ AC_CHECK_LIB([onig],[onig_version],[LIBS="$LIBS -lonig"; have_oniguruma=1;]))
++ # handle check results
++ AS_IF([test $have_oniguruma = 1], [
++ AC_DEFINE([HAVE_ONIGURUMA], 1, [Define to 1 if Oniguruma is installed])
++ ], [
++ AC_MSG_NOTICE([Oniguruma was not found.])
++ AC_MSG_NOTICE([Try setting the location using '--with-oniguruma=PREFIX'])
++ ])
++])
+
+ dnl Check for valgrind
+ AC_CHECK_PROGS(valgrind_cmd, valgrind)