grep-devel
[Top][All Lists]
Advanced

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

Re: FYI: four small changes


From: Paul Eggert
Subject: Re: FYI: four small changes
Date: Mon, 10 Apr 2023 11:44:08 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0

On 2023-04-09 22:42, Jim Meyering wrote:

+      unsigned char buf[128];
+      (void) pcre2_config (PCRE2_CONFIG_VERSION, buf);
+      fputs (_("\nBuilt with PCRE "), stdout);
+      puts ((char *) buf);

Doesn't this output the version of PCRE that grep is linked to (typically dynamically), as opposed to the version grep was built with? Unless "built" is meant to also include the dynamic linking phase during execution, which isn't how I interpreted "built".

How about the attached followup patch? It also moves this stuff into pcresearch.c, says PCRE2 is used by grep -P in case people worry about ordinary grep using PCRE, says "PCRE2" instead of "PCRE", and checks for pcre2_config buffer overflow (I know, too late, but this is the best we can do).

Attachment: 0001-grep-improve-PCRE2-version-output.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]