[Pkg-rust-maintainers] Bug#925544: Bug#925544: ripgrep: Exits immediately without warning if it encounters a NUL byte inside the file to be searched, might exit with wrong exit code depending on the position of the match
Axel Beckert
abe at debian.org
Tue Mar 26 17:44:11 GMT 2019
Hi Sylvestre,
Sylvestre Ledru wrote:
> Lowering the severity as rg remains functionnal in the huge majority
> of the cases.
Fair enough.
> I cannot reproduce the issue on my system
[…]
> doesn't show the warning
[…]
> cat aeh.txt | rg -a a
> cat aeh.txt | rg a
> returns the same thing
[…]
> afaik, with the correct file:
> % cat -v aeh.txt
> a
> M-CM-$
>
> a
Nope. The third line should read "^@" with "cat -v", not "". And since
that ^@ (the escaped display of a NUL byte, sometimes also displayed
as "\0") is the relevant part to reproduce this issue, it's no wonder,
you couldn't reproduce it. :-)
I guess the file got wrecked while saving. Wouldn't surprise me since
the file contains a NUL byte which is often considered to be a string
terminator. (Which is probably what ripgrep does, too. :-) Maybe I
shouldn't have declared the attachment as "text/plain" as my mail
client suggested.
Anyway, at least these command show all the expected output:
$ GET https://bugs.debian.org/cgi-bin/bugreport.cgi\?att\=1\;bug\=925544\;filename\=aeh.txt\;msg\=5 | cat -v
$ wget -q -O- https://bugs.debian.org/cgi-bin/bugreport.cgi\?att\=1\;bug\=925544\;filename\=aeh.txt\;msg\=5 | cat -v
$ curl -s https://bugs.debian.org/cgi-bin/bugreport.cgi\?att\=1\;bug\=925544\;filename\=aeh.txt\;msg\=5 | cat -v
So it should be safe to download the file with one of these commands:
$ GET https://bugs.debian.org/cgi-bin/bugreport.cgi\?att\=1\;bug\=925544\;filename\=aeh.txt\;msg\=5 > aeh.txt
$ wget -q -O- https://bugs.debian.org/cgi-bin/bugreport.cgi\?att\=1\;bug\=925544\;filename\=aeh.txt\;msg\=5 > aeh.txt
$ curl -s https://bugs.debian.org/cgi-bin/bugreport.cgi\?att\=1\;bug\=925544\;filename\=aeh.txt\;msg\=5 > aeh.txt
(JFTR: I used the en_US.UTF-8 locale despite the example with German
umlauts. :-)
> BTW, don't hesitate to report this directly upstream as it doesn't
> seem to be a packaging issue.
Ok, will do.
Regards, Axel
--
,''`. | Axel Beckert <abe at debian.org>, https://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5
`- | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
More information about the Pkg-rust-maintainers
mailing list