1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00
cde/src
Martijn Dekker 9f6841c37e Fix "$*" doing pattern matching if $IFS is wildcard (BUG_IFSGLOBS)
The bug is that "$*", and related expansions such as "${arr[*]}",
etc., do pattern matching if the first character of $IFS is a
wildcard. For example, the following:

    IFS=*
    set -- F ''
    case BUGFREE in
    BUG"$*")        echo bug ;;
    esac

outputs 'bug'. This bug can be reproduced in every other glob
pattern matching context as well, but not in pathname expansion.

src/cmd/ksh93/sh/macro.c: varsub():
- When joining fields into one for a "$*"-type expansion, check if
  a glob pattern matching operation follows (mp->pattern is set).
  If so, write a preceding backslash to escape the separator.

Resolves: https://github.com/ksh93/ksh/issues/489
Resolves: https://github.com/att/ast/issues/12
2022-07-28 23:36:39 +02:00
..
cmd Fix "$*" doing pattern matching if $IFS is wildcard (BUG_IFSGLOBS) 2022-07-28 23:36:39 +02:00
lib Upgrade licence to EPL 2.0 2022-07-28 05:46:08 +02:00
Mamfile More misc. tweaks and cleanups 2022-07-14 17:34:08 +02:00