GNU bug report logs - #30794
Cannot produce backslash through hexadecimal - sed (GNU sed) 4.2.2

Previous Next

Package: sed;

Reported by: 0xddaa <at> gmail.com

Date: Tue, 13 Mar 2018 15:26:01 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: 0xddaa <0xddaa <at> gmail.com>
To: Assaf Gordon <assafgordon <at> gmail.com>
Cc: 0xddaa <0xddaa <at> gmail.com>, 30794 <at> debbugs.gnu.org
Subject: bug#30794: Cannot produce backslash through hexadecimal - sed (GNU sed) 4.2.2
Date: Wed, 14 Mar 2018 11:50:31 +0800
[Message part 1 (text/plain, inline)]
I am glad that my report is helpful.
Thanks for your praise. :)

2018-03-14 10:45 GMT+08:00 Assaf Gordon <assafgordon <at> gmail.com>:

> Hello,
>
> On Tue, Mar 13, 2018 at 06:02:05PM +0800, 0xddaa wrote:
> > There is the Proof-of-Concept:
> >
> > # echo z | sed 's/z/\x5c/' # \x5c == '\'
> > \ # success
> > # echo z | sed 's/z/\x5c\x61/'
> > a # backslash is gone
> >
> > According the manual, *\xxx* should produce an ascii character. sed
> should
> > not treat *\x5c* as an escape symbol.
>
> Thank you for reporting this issue with such clear details
> and providing a bug fix - much appreciated!
>
> I expanded your fix by adding tests and news item, see attached patch.
>
> There is a small issue that this is a backwards incompatible change,
> and might break some exotic (bad) scripts.
>
> I'll wait for other opinions before pushing this.
>
> Jim,
> What do you think?
>
> regards,
>  - assaf
>
[Message part 2 (text/html, inline)]

This bug report was last modified 7 years and 132 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.