Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/samurai/files/, dev-util/samurai/
Date: Thu, 29 Apr 2021 19:50:39
Message-Id: 1619725797.68b485ff058af6b943ff6633724e3d2ddeb2c7b2.polynomial-c@gentoo
1 commit: 68b485ff058af6b943ff6633724e3d2ddeb2c7b2
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 29 19:40:38 2021 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 29 19:49:57 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68b485ff
7
8 dev-util/samurai: Security revbump to fix null pointer dereference
9
10 Removed old
11
12 Bug: https://bugs.gentoo.org/786951
13 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
14
15 .../files/samurai-1.2-null_pointer_fix.patch | 26 ++++++++++++++++++++++
16 .../{samurai-1.2.ebuild => samurai-1.2-r1.ebuild} | 4 ++++
17 2 files changed, 30 insertions(+)
18
19 diff --git a/dev-util/samurai/files/samurai-1.2-null_pointer_fix.patch b/dev-util/samurai/files/samurai-1.2-null_pointer_fix.patch
20 new file mode 100644
21 index 00000000000..fbc97b03d47
22 --- /dev/null
23 +++ b/dev-util/samurai/files/samurai-1.2-null_pointer_fix.patch
24 @@ -0,0 +1,26 @@
25 +From d2af3bc375e2a77139c3a28d6128c60cd8d08655 Mon Sep 17 00:00:00 2001
26 +From: Michael Forney <mforney@×××××××.org>
27 +Date: Sun, 4 Apr 2021 03:50:09 -0700
28 +Subject: [PATCH] parse: Check for non-empty command/rspfile/rspfile_content
29 +
30 +This matches ninja behavior and prevents the possibility of a rule
31 +with an empty (NULL) command string.
32 +
33 +Fixes #68.
34 +---
35 + parse.c | 2 ++
36 + 1 file changed, 2 insertions(+)
37 +
38 +diff --git a/parse.c b/parse.c
39 +index f79a5ee..b4b98a1 100644
40 +--- a/parse.c
41 ++++ b/parse.c
42 +@@ -42,6 +42,8 @@ parserule(struct scanner *s, struct environment *env)
43 + var = scanname(s);
44 + parselet(s, &val);
45 + ruleaddvar(r, var, val);
46 ++ if (!val)
47 ++ continue;
48 + if (strcmp(var, "command") == 0)
49 + hascommand = true;
50 + else if (strcmp(var, "rspfile") == 0)
51
52 diff --git a/dev-util/samurai/samurai-1.2.ebuild b/dev-util/samurai/samurai-1.2-r1.ebuild
53 similarity index 90%
54 rename from dev-util/samurai/samurai-1.2.ebuild
55 rename to dev-util/samurai/samurai-1.2-r1.ebuild
56 index 4333d1997bf..ad8d964b12b 100644
57 --- a/dev-util/samurai/samurai-1.2.ebuild
58 +++ b/dev-util/samurai/samurai-1.2-r1.ebuild
59 @@ -16,6 +16,10 @@ fi
60 LICENSE="ISC Apache-2.0 MIT"
61 SLOT="0"
62
63 +PATCHES=(
64 + "${FILESDIR}/${P}-null_pointer_fix.patch" #786957
65 +)
66 +
67 src_install() {
68 emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install
69 dodoc README.md