[oe-commits] [openembedded-core] 14/23: toolchain-shar-extract.sh: check the length for target_sdk_dir
git at git.openembedded.org
git at git.openembedded.org
Mon Mar 28 14:56:39 UTC 2016
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit 2145bd0d188158c2db85b583b4d7f3ad4612593b
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