* [gentoo-dev] [PATCH] eapi8-dosym.eclass: Prevent globbing of argument in _dosym8_canonicalize
@ 2023-06-06 4:11 Ulrich Müller
2023-06-06 16:03 ` Mike Gilbert
0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Müller @ 2023-06-06 4:11 UTC (permalink / raw
To: gentoo-dev; +Cc: Ulrich Müller
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
eclass/eapi8-dosym.eclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eclass/eapi8-dosym.eclass b/eclass/eapi8-dosym.eclass
index 4e3977ef54cf..93b11dda7fd6 100644
--- a/eclass/eapi8-dosym.eclass
+++ b/eclass/eapi8-dosym.eclass
@@ -31,7 +31,7 @@ esac
_dosym8_canonicalize() {
local path slash i prev out IFS=/
- path=( $1 )
+ read -r -d '' -a path <<< "$1"
[[ $1 == /* ]] && slash=/
while true; do
@@ -39,7 +39,7 @@ _dosym8_canonicalize() {
# 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
--
2.41.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-06 16:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-06 4:11 [gentoo-dev] [PATCH] eapi8-dosym.eclass: Prevent globbing of argument in _dosym8_canonicalize Ulrich Müller
2023-06-06 16:03 ` Mike Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox