[Bug 880120] [NEW] read -r does not protect backslashes

Ian! D. Allen idallen at idallen.ca
Sat Oct 22 22:45:27 UTC 2011


Public bug reported:

Both natty and oneiric dash fail to protect backslashes when using "read
-r".

natty:   dash 0.5.5.1-7.2ubuntu1
oneiric: dash 0.5.5.1-7.4ubuntu1

Example bug:

    $ echo '000\n999' | dash -c ' read -r f ; echo "$f" '
    000
    999

Other shells do it correctly:

    $ echo '000\n999' | bash -c ' read -r f ; echo "$f" '
    000\n999

    $ echo '000\n999' | static-sh -c ' read -r f ; echo "$f" '
    000\n999

This means you can't use "read" to read arbitrary lines of text.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: dash 0.5.5.1-7.2ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-12.51-generic 2.6.38.8
Uname: Linux 2.6.38-12-generic x86_64
Architecture: amd64
Date: Sat Oct 22 18:28:32 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
SourcePackage: dash
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: dash (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug natty oneiric

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dash in Ubuntu.
https://bugs.launchpad.net/bugs/880120

Title:
  read -r does not protect backslashes

Status in “dash” package in Ubuntu:
  New

Bug description:
  Both natty and oneiric dash fail to protect backslashes when using
  "read -r".

  natty:   dash 0.5.5.1-7.2ubuntu1
  oneiric: dash 0.5.5.1-7.4ubuntu1

  Example bug:

      $ echo '000\n999' | dash -c ' read -r f ; echo "$f" '
      000
      999

  Other shells do it correctly:

      $ echo '000\n999' | bash -c ' read -r f ; echo "$f" '
      000\n999

      $ echo '000\n999' | static-sh -c ' read -r f ; echo "$f" '
      000\n999

  This means you can't use "read" to read arbitrary lines of text.

  ProblemType: Bug
  DistroRelease: Ubuntu 11.04
  Package: dash 0.5.5.1-7.2ubuntu1
  ProcVersionSignature: Ubuntu 2.6.38-12.51-generic 2.6.38.8
  Uname: Linux 2.6.38-12-generic x86_64
  Architecture: amd64
  Date: Sat Oct 22 18:28:32 2011
  InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
  SourcePackage: dash
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/880120/+subscriptions




More information about the foundations-bugs mailing list