• [gentoo-dev] [PATCH] eapi8-dosym.eclass: Prevent globbing of argument i

    From =?UTF-8?q?Ulrich=20M=C3=BCller?=@21:1/5 to All on Tue Jun 6 06:20:01 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mike Gilbert@21:1/5 to ulm@gentoo.org on Tue Jun 6 18:10:01 2023
    On Tue, Jun 6, 2023 at 12:11 AM Ulrich Müller <ulm@gentoo.org> wrote:

    Signed-off-by: Ulrich Müller <ulm@gentoo.org>
    ---
    eclass/eapi8-dosym.eclass | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    Looks good to me.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)