[oe-commits] [openembedded-core] 26/28: toolchain-shar-extract.sh: check the length for target_sdk_dir

git at git.openembedded.org git at git.openembedded.org
Sat Mar 26 08:04:35 UTC 2016


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

commit 6c48492fa3d830a1578c68bd5a4fdf57dce2fdf3
Author: Wenlin Kang <wenlin.kang at windriver.com>
AuthorDate: Wed Mar 23 16:35:49 2016 +0800

    toolchain-shar-extract.sh: check the length for target_sdk_dir
    
    Check the length for target_sdk_dir to ensure the relocation
    behaviour in relocate_sdk.py is correct.
    
    Signed-off-by: Wenlin Kang <wenlin.kang at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/files/toolchain-shar-extract.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index 12d39c3..0295bde 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -110,6 +110,12 @@ else
 	target_sdk_dir=$(readlink -m "$target_sdk_dir")
 fi
 
+# limit the length for target_sdk_dir, ensure the relocation behaviour in relocate_sdk.py has right result.
+if [ ${#target_sdk_dir} -gt 2048 ]; then
+	echo "Error: The target directory path is too long!!!"
+	exit 1
+fi
+
 if [ "$SDK_EXTENSIBLE" = "1" ]; then
 	# We're going to be running the build system, additional restrictions apply
 	if echo "$target_sdk_dir" | grep -q '[+\ @$]'; then

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


More information about the Openembedded-commits mailing list