summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-09 12:49:48 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-15 17:56:58 +0100
commit11fdce318fd5f2f30c719a0f3b484d348aa35204 (patch)
tree8990feb874d4396b3a5d58bb7d691bbf7166a73c /meta/recipes-devtools/rpm
parentc438388d6be918f6154c20a9b170e02cc9d1bd3a (diff)
downloadpoky-11fdce318fd5f2f30c719a0f3b484d348aa35204.tar.gz
rpm: Fix patch to ensure variables aren't used uninitialised
Recent patches were applied which removed a function which set the xx variable. This means xx can be uninitalised and prerm functions can fail. This adjusts the patch to ensure the xx value isn't used in such a way. (From OE-Core rev: 3feebf7d28ef1049075a9d2ad3d64fc9b35015f2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rpm')
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch16
1 files changed, 13 insertions, 3 deletions
diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
index a38675f89c..bf24d43eb9 100644
--- a/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
+++ b/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
@@ -6,6 +6,9 @@ Subject: [PATCH 1/2] Do not reset the PATH environment variable before running
6 6
7We add lots of native stuff into it and scriptlets rely on that. 7We add lots of native stuff into it and scriptlets rely on that.
8 8
9Also need to remove the xx test later in the function since the
10value could now be used un-initialised.
11
9Upstream-Status: Inappropriate [oe-core specific] 12Upstream-Status: Inappropriate [oe-core specific]
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 13Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11--- 14---
@@ -25,6 +28,13 @@ index 92f949fa2..7c1aa75a8 100644
25 free(ipath); 28 free(ipath);
26 } 29 }
27 30
28-- 31@@ -206,9 +206,7 @@ static void doScriptExec(ARGV_const_t ar
292.11.0 32 /* XXX Don't mtrace into children. */
30 33 unsetenv("MALLOC_CHECK_");
34
35- if (xx == 0) {
36 xx = execv(argv[0], argv);
37- }
38 }
39 _exit(127); /* exit 127 for compatibility with bash(1) */
40 }