Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Eduardo =?iso-8859-1?Q?A=2E_Bustamante_L=F3pez?= Newsgroups: gnu.bash.bug Subject: Re: Which commit for a bug in 4.3.48 which is fixed in 4.4.23 Date: Fri, 21 Sep 2018 09:52:29 -0700 Lines: 38 Approved: bug-bash@gnu.org Message-ID: References: <20180921111138.GA24148@boole.suse.de> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: usenet.stanford.edu 1537548757 12550 208.118.235.17 (21 Sep 2018 16:52:37 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash@gnu.org To: "Dr. Werner Fink" Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Un5Ew6dwVHmm8Gxk+Ui7WHR8ZyzG9mUYAQRk3Vc8p2g=; b=D3kTGBRI8iwC7RXbgTfzCcQAyKeczHlMXJTduUODp6T6u/yBxsqPA79fd02Wb8mEWZ GaaR+uv73WUPagkg2IVH57bvAFo/apmYJOqcMDwBXeJSsSNUTW+x2nWVTPX/jMNpcx/z dSAlZGXRnS2GjkbDcDA7E4C+N65QamJJd1qPbZEhcNoARJ+ONWAffZZWSt37riUKIPCM vJjMwDm9gd5cNWCqi/+gtMFF/U8bgL6+I9CSPJQ2elC2rnuBqxD0oxiL5+6wz/d2P/oe kWfNKW6yogGNoNnK5r8dNtBPKnyyL5eXO07yVScPkSg3hRD/KujEQQfof7vqD30cc9T6 87fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=Un5Ew6dwVHmm8Gxk+Ui7WHR8ZyzG9mUYAQRk3Vc8p2g=; b=LHY/USF8TzWpFlNgrsLubtDYSyjM8MSnVQYF2KRu/tzfVCh0Opi9Fxk4dzMrX+d8zR gNjErYQxoTo+MkNGGreKaqUXJ7Eji34HK8bJbge3n5OvWwmWDPiPMcGsjsvQJ5kSHhow 1hQ5yok55OEuB8SWVzCkYO1y7tYspqu2mHUTCWpLwYZ7UD9/r+VdJ2x6ibzlFLJSL2Oo qWTMw4kiBc9DUEbJMWr+cI92MyNX5xZUnglgQfRraXWv62/9vc4wg4tKHi0YtZB9tQL3 0HneAtz+AcLNjwlXynGp5NfipU6gwhFvmAPPQGcP3JSvSfPJrw9S6+eaJKD1DVEHVAOm tIng== X-Gm-Message-State: APzg51BlwnhEaiAzoKbUGuGbQupQ5jrbcO2gD/mPYixIZw7NdtDQ36KF d2krXhcCE0nDIop4chcDwpg= X-Google-Smtp-Source: ANB0VdbMI256cVRNBcDeg0++1q3KRn8WsqhizYruPc0HfAxeHpGCyXKeme162iKEOuoNKsi3+NROAA== X-Received: by 2002:a62:d2c4:: with SMTP id c187-v6mr47365479pfg.8.1537548752174; Fri, 21 Sep 2018 09:52:32 -0700 (PDT) Mail-Followup-To: "Dr. Werner Fink" , bug-bash@gnu.org Content-Disposition: inline In-Reply-To: <20180921111138.GA24148@boole.suse.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::531 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:14627 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 + 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);