GNU bug report logs - #51462
sed bug: ASCII NUL not handled in simple pattern

Previous Next

Package: sed;

Reported by: Frances Wingerter <fw <at> immunant.com>

Date: Thu, 28 Oct 2021 16:49:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Frances Wingerter <fw <at> immunant.com>
To: 51462 <at> debbugs.gnu.org
Subject: bug#51462: sed bug: ASCII NUL not handled in simple pattern
Date: Thu, 28 Oct 2021 15:25:42 +0000
I'm using sed 4.8 (`sed (GNU sed) 4.8` per `sed --version`) on x86_64
Arch Linux.

Compare the output of these two sed invocations:
```
$ echo -e 'a\nb\n\0\nc\n' | sed -e '/\0/,$d'
a
b

c

```
and
```
$ echo -e 'a\nb\n\v\nc\n' | sed -e '/\v/,$d'
a
b
```

The latter is the expected behavior, but when input and pattern use
`\0`, sed seems to miss the matches and never triggers.

Hopefully this should be an easy fix.
Thanks,
Frances




This bug report was last modified 3 years and 228 days ago.

Previous Next


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