diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2021-04-29 21:40:38 +0200 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2021-04-29 21:49:57 +0200 |
commit | 68b485ff058af6b943ff6633724e3d2ddeb2c7b2 (patch) | |
tree | 4e89d123ab55d37a295f82c1b793c2edeedc5407 /dev-util/samurai/files | |
parent | Revert "dev-util/samurai: Security revbump to fix mull pointer dereference" (diff) | |
download | gentoo-68b485ff058af6b943ff6633724e3d2ddeb2c7b2.tar.gz gentoo-68b485ff058af6b943ff6633724e3d2ddeb2c7b2.tar.bz2 gentoo-68b485ff058af6b943ff6633724e3d2ddeb2c7b2.zip |
dev-util/samurai: Security revbump to fix null pointer dereference
Removed old
Bug: https://bugs.gentoo.org/786951
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'dev-util/samurai/files')
-rw-r--r-- | dev-util/samurai/files/samurai-1.2-null_pointer_fix.patch | 26 |
1 files changed, 26 insertions, 0 deletions
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 new file mode 100644 index 000000000000..fbc97b03d478 --- /dev/null +++ b/dev-util/samurai/files/samurai-1.2-null_pointer_fix.patch @@ -0,0 +1,26 @@ +From d2af3bc375e2a77139c3a28d6128c60cd8d08655 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sun, 4 Apr 2021 03:50:09 -0700 +Subject: [PATCH] parse: Check for non-empty command/rspfile/rspfile_content + +This matches ninja behavior and prevents the possibility of a rule +with an empty (NULL) command string. + +Fixes #68. +--- + parse.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/parse.c b/parse.c +index f79a5ee..b4b98a1 100644 +--- a/parse.c ++++ b/parse.c +@@ -42,6 +42,8 @@ parserule(struct scanner *s, struct environment *env) + var = scanname(s); + parselet(s, &val); + ruleaddvar(r, var, val); ++ if (!val) ++ continue; + if (strcmp(var, "command") == 0) + hascommand = true; + else if (strcmp(var, "rspfile") == 0) |