Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15791

Filename Expansion bug

From Mickael KENIKSSI <k.mickael@gmail.com>
Newsgroups gnu.bash.bug
Subject Filename Expansion bug
Date 2020-01-08 08:34 +0100
Message-ID <mailman.2243.1578475726.1979.bug-bash@gnu.org> (permalink)
References <CAJV=ESGhY7Wu==vMeUS+icoLBYkONBxuUpTdoUsm3fv=EZFiEQ@mail.gmail.com>

Show all headers | View raw


Hello,

I found a bug regarding how pathnames are processed during filename
expansion. The result for non-normalized path-patterns may get mangled in a
such a way that it becomes inconsistent and unpredictable, making it
useless for string comparison or any kind of string manipulation where
having it in the exact same form as the pattern is required.

How to reproduce :

$ mkdir -p a/b/c d/e/f g/h/e; printf '%s\n' .////*//*///////*
> .////a/b/c
> .////d/e/f
> .////g/h/e
>

This is correct from a filesystem perspective but not from a string
perspective, where you'd need each of the computed path as-is:

.////a//b///////c
> .////d//e///////f
> .////g//h///////i
>

This occurs on all versions >= Bash 3.2.

Best regards,
Mickaƫl

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Filename Expansion bug Mickael KENIKSSI <k.mickael@gmail.com> - 2020-01-08 08:34 +0100

csiph-web