Your message dated Thu, 21 Mar 2024 02:48:01 +0100
with message-id <[email protected]>
and subject line Re: Bug#445453: builtin "read -a" adds junk to escaped strings
has caused the Debian Bug report #445453,
regarding builtin "read -a" adds junk to escaped strings
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
445453: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=445453
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: bash
Version: 3.1-4
Severity: normal

The "-a arrray" option to the "read" builtin causes junk characters
(ascii 1, ^A) to get inserted into escaped portions of strings.

$ echo "hello\ world" | while read a ; do echo $a ; done | hd
00000000  68 65 6c 6c 6f 20 77 6f  72 6c 64 0a              |hello world.|
0000000c
$ echo "hello\ world" | while read -a a ; do echo ${a[0]} ; done | hd
00000000  68 65 6c 6c 6f 01 20 77  6f 72 6c 64 0a           |hello. world.|
0000000d

Notice the extra 01 after "hello" in the second dump.

-jim

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.21-2-686
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages bash depends on:
ii  base-files                    3.1.13     Debian base system miscellaneous f
ii  debianutils                   2.17       Miscellaneous utilities specific t
ii  libc6                         2.6.1-1+b1 GNU C Library: Shared libraries
ii  libncurses5                   5.5-2      Shared libraries for terminal hand

bash recommends no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
Version: 5.0-6

On Fri, 05 Oct 2007 18:27:42 -0400 Jim Paris <[email protected]> wrote:
Package: bash
Version: 3.1-4
Severity: normal

The "-a arrray" option to the "read" builtin causes junk characters
(ascii 1, ^A) to get inserted into escaped portions of strings.

$ echo "hello\ world" | while read a ; do echo $a ; done | hd
00000000  68 65 6c 6c 6f 20 77 6f  72 6c 64 0a              |hello world.|
0000000c
$ echo "hello\ world" | while read -a a ; do echo ${a[0]} ; done | hd
00000000  68 65 6c 6c 6f 01 20 77  6f 72 6c 64 0a           |hello. world.|
0000000d

Notice the extra 01 after "hello" in the second dump.

This issue does not seem to affect version 5.0-6 and later of bash.


    $ echo "hello\ world" | while read a ; do echo $a ; done | hd
    00000000  68 65 6c 6c 6f 20 77 6f  72 6c 64 0a    |hello world.|
    0000000c

    $ echo "hello\ world" | while read -a a ; do echo ${a[0]} ; done |hd
    00000000  68 65 6c 6c 6f 20 77 6f  72 6c 64 0a    |hello world.|
    0000000c

Please reopen this bug if you can still reproduce this issue.

Regards,

--
Gioele Barabucci

--- End Message ---

Reply via email to