Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14627

Re: Which commit for a bug in 4.3.48 which is fixed in 4.4.23

From Eduardo A. Bustamante López <dualbus@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: Which commit for a bug in 4.3.48 which is fixed in 4.4.23
Date 2018-09-21 09:52 -0700
Message-ID <mailman.1101.1537548756.1284.bug-bash@gnu.org> (permalink)
References <20180921111138.GA24148@boole.suse.de>

Show all headers | View raw


On Fri, Sep 21, 2018 at 01:11:38PM +0200, Dr. Werner Fink wrote:
> Hi,
> 
> with 4.3.48 the line
> 
>   T="";echo ">${T//*/ }<"
> 
> leads to
> 
>   ><
> 
> but with 4.4.23 the correct result is given back
> 
>   > <
> 
> in the git repro I do not find any useful login entry for this

Check commit 34ec1876071b76d3654a418682e3f34ca9a72f1a:

+lib/glob/gmisc.c
+       - match_pattern_char, match_pattern_wchar: if passed an empty string,
+         return a match if the first character of the pattern is `*'
+
+subst.c
+       - pat_subst: change to allow empty strings to be replaced as long as
+         pattern matches empty string.  Report and fix from isabella parakiss
+         <izaberina@gmail.com>

In particular, this change to match_pattern:

@@ -4435,7 +4437,7 @@ match_pattern (string, pat, mtype, sp, ep)
   size_t slen, plen, mslen, mplen;
 #endif

-  if (string == 0 || *string == 0 || pat == 0 || *pat == 0)
+  if (string == 0 || pat == 0 || *pat == 0)
     return (0);

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Which commit for a bug in 4.3.48 which is fixed in 4.4.23 Eduardo A. Bustamante López <dualbus@gmail.com> - 2018-09-21 09:52 -0700

csiph-web