public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Ulrich Müller" <ulm@gentoo.org>
Subject: [gentoo-dev] [PATCH] eapi8-dosym.eclass: Prevent globbing of argument in _dosym8_canonicalize
Date: Tue,  6 Jun 2023 06:11:33 +0200	[thread overview]
Message-ID: <20230606041203.32348-1-ulm@gentoo.org> (raw)

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



             reply	other threads:[~2023-06-06  4:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-06  4:11 Ulrich Müller [this message]
2023-06-06 16:03 ` [gentoo-dev] [PATCH] eapi8-dosym.eclass: Prevent globbing of argument in _dosym8_canonicalize Mike Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230606041203.32348-1-ulm@gentoo.org \
    --to=ulm@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox