mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
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: 23f15c63777020f5d43b070a1eb2bcf246c19ff8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
+13
-3
@@ -6,6 +6,9 @@ Subject: [PATCH 1/2] Do not reset the PATH environment variable before running
|
|||||||
|
|
||||||
We add lots of native stuff into it and scriptlets rely on that.
|
We add lots of native stuff into it and scriptlets rely on that.
|
||||||
|
|
||||||
|
Also need to remove the xx test later in the function since the
|
||||||
|
value could now be used un-initialised.
|
||||||
|
|
||||||
Upstream-Status: Inappropriate [oe-core specific]
|
Upstream-Status: Inappropriate [oe-core specific]
|
||||||
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||||
---
|
---
|
||||||
@@ -25,6 +28,13 @@ index 92f949fa2..7c1aa75a8 100644
|
|||||||
free(ipath);
|
free(ipath);
|
||||||
}
|
}
|
||||||
|
|
||||||
--
|
@@ -206,9 +206,7 @@ static void doScriptExec(ARGV_const_t ar
|
||||||
2.11.0
|
/* XXX Don't mtrace into children. */
|
||||||
|
unsetenv("MALLOC_CHECK_");
|
||||||
|
|
||||||
|
- if (xx == 0) {
|
||||||
|
xx = execv(argv[0], argv);
|
||||||
|
- }
|
||||||
|
}
|
||||||
|
_exit(127); /* exit 127 for compatibility with bash(1) */
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user