Re: [PATCH v13 3/3] grep/pcre2: fix an edge case concerning ascii patterns and UTF-8 data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 16, 2021 at 1:30 AM Andreas Schwab <schwab@xxxxxxxxxxxxxx> wrote:
>
> expecting success of 7812.13 'PCRE v2: grep ASCII from invalid UTF-8 data':
>         git grep -h "var" invalid-0x80 >actual &&
>         test_cmp expected actual &&
>         git grep -h "(*NO_JIT)var" invalid-0x80 >actual &&
>         test_cmp expected actual
>
> ++ git grep -h var invalid-0x80
> ++ test_cmp expected actual
> ++ test 2 -ne 2
> ++ eval 'diff -u' '"$@"'
> +++ diff -u expected actual
> ++ git grep -h '(*NO_JIT)var' invalid-0x80
> fatal: pcre2_match failed with error code -22: UTF-8 error: isolated byte with 0x80 bit set

That is exactly what I was worried about, this is not failing one
test, but making `git grep` unusable in any repository that has any
binary files that might be reachable by it, and it is likely affecting
anyone using PCRE older than 10.34

Reverting this specific commit might fix it and is unlikely to
introduce other issues, did you try it?

Carlo



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux