delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/27/04:38:31

X-Spam-Check-By: sourceware.org
Date: Sat, 27 Jan 2007 10:38:08 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: grep -P segfault
Message-ID: <20070127093808.GG27843@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20070126220628 DOT 76419 DOT qmail AT hyperreal DOT org> <45BA8699 DOT D1E474EA AT dessent DOT net> <45BA88EF DOT FC91A2E7 AT dessent DOT net>
Mime-Version: 1.0
In-Reply-To: <45BA88EF.FC91A2E7@dessent.net>
User-Agent: Mutt/1.4.2.2i
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Jan 26 15:04, Brian Dessent wrote:
> Brian Dessent wrote:
> 
> > Right before calling memchr, beg points to the first byte in the string
> > "hello\n", end points to the \n character, and so does buflim.  Thus
> > (buflim - end) is zero, and memchr returns NULL.  From there match_size
> > is miscalculated and from there it's all downhill.  The test for EOL
> > should be skipped if buflim == end.
> 
> I see this is an old bug, reported and fixed in CVS nearly two years
> ago:
> 
> http://lists.gnu.org/archive/html/bug-grep/2005-02/msg00052.html
> http://savannah.gnu.org/bugs/?4531
> 
> And yet apparently the last released version is still 2.5.1a from
> 19-Nov-2004.  Sigh.

There's no newer grep release than 2.5.1a.  Looks like most Linux
distros use additional patches from CVS.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019