Package: sed Version: 4.2.1-7 Severity: normal
If \x escape sequence in LHS resolves to some character which has special meaning in sed LHS (like "^", "\", ...), GNU sed does not use it as hex-escaped, but instead as if it was literaly that character. For example: echo 'a^c' | sed -e 's/\x5e/b/' should produce output "abc" (as it does in "ssed" or "perl -pe"), but in GNU sed it produces "ba^c". or, echo 'a\\c' | sed -e 's/\x5c/b/' should again produce output "abc", but in GNU sed it terminates sed with error: "sed: -e expression #1, char 10: Trailing backslash" (as it interprets it as "sed -e 's/\/b/'" and not as "sed -e 's/\\/b/'") There are several more such problematic characters. Proposed solution: all such \xNN escapes should be treated as if the characters are really escaped, for example '\x5e' in LHS should be treated like '\^' and not like special-meaning '^'. -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (650, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores) Locale: LANG=hr_HR, LC_CTYPE=hr_HR (charmap=ISO-8859-2) Shell: /bin/sh linked to /bin/dash Versions of packages sed depends on: ii dpkg 1.15.8.5 Debian package management system ii install-info 4.13a.dfsg.1-6 Manage installed documentation in ii libc6 2.11.2-7 Embedded GNU C Library: Shared lib ii libselinux1 2.0.96-1 SELinux runtime shared libraries sed recommends no packages. sed suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org