mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-26 19:11:46 +02:00
Merge branch 'master' into core-updates
This commit is contained in:
@@ -1,44 +0,0 @@
|
||||
From da1ed24209121f7b0f03f360b1029d7125a38e70 Mon Sep 17 00:00:00 2001
|
||||
From: Efraim Flashner <efraim@flashner.co.il>
|
||||
Date: Tue, 4 Jul 2017 12:44:53 +0300
|
||||
Subject: [PATCH] Add NO_INTEL_COMPAT flag to Makefile.
|
||||
|
||||
see also: https://github.com/xiangzhou/GEMMA/pull/47
|
||||
|
||||
---
|
||||
Makefile | 12 ++++++++----
|
||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 5bb8748..712b1ad 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -11,6 +11,7 @@
|
||||
SYS = LNX
|
||||
# Leave blank after "=" to disable; put "= 1" to enable
|
||||
WITH_LAPACK = 1
|
||||
+NO_INTEL_COMPAT =
|
||||
FORCE_32BIT =
|
||||
FORCE_DYNAMIC =
|
||||
DIST_NAME = gemma-0.96
|
||||
@@ -64,10 +65,13 @@ endif
|
||||
HDR += $(SRC_DIR)/lapack.h
|
||||
endif
|
||||
|
||||
-ifdef FORCE_32BIT
|
||||
- CPPFLAGS += -m32
|
||||
-else
|
||||
- CPPFLAGS += -m64
|
||||
+ifdef NO_INTEL_COMPAT
|
||||
+ else
|
||||
+ ifdef FORCE_32BIT
|
||||
+ CPPFLAGS += -m32
|
||||
+ else
|
||||
+ CPPFLAGS += -m64
|
||||
+ endif
|
||||
endif
|
||||
|
||||
ifdef FORCE_DYNAMIC
|
||||
--
|
||||
2.13.2
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
Fix CVE-2015-8863 (Off-by-one error in the tokenadd function in
|
||||
jv_parse.c in jq allows remote attackers to cause a denial of service
|
||||
(crash) via a long JSON-encoded number, which triggers a heap-based
|
||||
buffer overflow):
|
||||
|
||||
<https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8863>
|
||||
|
||||
Copied from upstream code repository:
|
||||
|
||||
<https://github.com/stedolan/jq/commit/8eb1367ca44e772963e704a700ef72ae2e12babd>
|
||||
|
||||
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.
|
||||
---
|
||||
jv_parse.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/jv_parse.c b/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)
|
||||
@@ -0,0 +1,62 @@
|
||||
Fix a test failure on 32-bit platforms as reported
|
||||
at <https://github.com/libgit2/libgit2/issues/4868>.
|
||||
|
||||
From 415a8ae9c9b6ac18f0524b6af8e58408b426457d Mon Sep 17 00:00:00 2001
|
||||
From: Edward Thomson <ethomson@edwardthomson.com>
|
||||
Date: Thu, 13 Sep 2018 13:27:07 +0100
|
||||
Subject: [PATCH] tests: don't run buf::oom on 32-bit systems
|
||||
|
||||
On a 32-bit Linux systems, the value large enough to make malloc
|
||||
guarantee a failure is also large enough that valgrind considers it
|
||||
"fishy". Skip this test on those systems entirely.
|
||||
---
|
||||
tests/buf/oom.c | 14 +++++++++-----
|
||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/tests/buf/oom.c b/tests/buf/oom.c
|
||||
index 2741a8ddf2..ec3bad9979 100644
|
||||
--- a/tests/buf/oom.c
|
||||
+++ b/tests/buf/oom.c
|
||||
@@ -11,12 +11,8 @@
|
||||
*/
|
||||
#if defined(GIT_ARCH_64) && defined(__linux__)
|
||||
# define TOOBIG 0x0fffffffffffffff
|
||||
-#elif defined(__linux__)
|
||||
-# define TOOBIG 0x0fffffff
|
||||
#elif defined(GIT_ARCH_64)
|
||||
# define TOOBIG 0xffffffffffffff00
|
||||
-#else
|
||||
-# define TOOBIG 0xffffff00
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -25,13 +21,18 @@
|
||||
* will fail. And because the git_buf_grow() wrapper always
|
||||
* sets mark_oom, the code in git_buf_try_grow() will free
|
||||
* the internal buffer and set it to git_buf__oom.
|
||||
- *
|
||||
+ *
|
||||
* We initialized the internal buffer to (the static variable)
|
||||
* git_buf__initbuf. The purpose of this test is to make sure
|
||||
* that we don't try to free the static buffer.
|
||||
+ *
|
||||
+ * Skip this test entirely on 32-bit platforms; a buffer large enough
|
||||
+ * to guarantee malloc failures is so large that valgrind considers
|
||||
+ * it likely to be an error.
|
||||
*/
|
||||
void test_buf_oom__grow(void)
|
||||
{
|
||||
+#ifdef GIT_ARCH_64
|
||||
git_buf buf = GIT_BUF_INIT;
|
||||
|
||||
git_buf_clear(&buf);
|
||||
@@ -40,6 +41,9 @@ void test_buf_oom__grow(void)
|
||||
cl_assert(git_buf_oom(&buf));
|
||||
|
||||
git_buf_free(&buf);
|
||||
+#else
|
||||
+ cl_skip();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void test_buf_oom__grow_by(void)
|
||||
Reference in New Issue
Block a user