aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2023-06-06 06:05:11 +0200
committerUlrich Müller <ulm@gentoo.org>2023-06-06 17:50:32 +0200
commit65bb6ae01f359d82be453bf01a9e8f49171d8436 (patch)
treebba8d3e284c44bc2b6d34444b7903d41d15b7ef1 /bin
parentsetup.py: prepare for portage-3.0.48.1 (diff)
downloadportage-65bb6ae01f359d82be453bf01a9e8f49171d8436.tar.gz
portage-65bb6ae01f359d82be453bf01a9e8f49171d8436.tar.bz2
portage-65bb6ae01f359d82be453bf01a9e8f49171d8436.zip
dosym: Prevent globbing of argument in dosym_canonicalize
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ebuild-helpers/dosym6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ebuild-helpers/dosym b/bin/ebuild-helpers/dosym
index e41558a15..9ed27b8ce 100755
--- a/bin/ebuild-helpers/dosym
+++ b/bin/ebuild-helpers/dosym
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
@@ -33,7 +33,7 @@ if [[ ${option_r} ]]; then
dosym_canonicalize() {
local path slash i prev out IFS=/
- path=( ${1} )
+ read -r -d '' -a path <<< "${1}"
[[ ${1} == /* ]] && slash=/
while true; do
@@ -41,7 +41,7 @@ if [[ ${option_r} ]]; then
# or as a special case, "/.." at the beginning of the path.
# Also drop empty and "." path components as we go along.
prev=
- for i in ${!path[@]}; do
+ for i in "${!path[@]}"; do
if [[ -z ${path[i]} || ${path[i]} == . ]]; then
unset "path[i]"
elif [[ ${path[i]} != .. ]]; then