[oe-commits] [openembedded-core] 16/18: rpm: Fix patch to ensure variables aren't used uninitialised

git at git.openembedded.org git at git.openembedded.org
Fri Jun 15 10:44:51 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch sumo-next
in repository openembedded-core.

commit 3feebf7d28ef1049075a9d2ad3d64fc9b35015f2
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Sat Jun 9 12:49:48 2018 +0200

    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.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 ...t-reset-the-PATH-environment-variable-before-ru.patch | 16 +++++++++++++---
 1 file 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 a38675f..bf24d43 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
 
 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]
 Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
 ---
@@ -25,6 +28,13 @@ index 92f949fa2..7c1aa75a8 100644
  	free(ipath);
      }
  
--- 
-2.11.0
-
+@@ -206,9 +206,7 @@ static void doScriptExec(ARGV_const_t ar
+ 	/* 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) */
+ }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list