delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/02/28/20:36:41

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
Received-SPF: pass (google.com: domain of yselkowitz AT gmail DOT com designates 10.50.195.231 as permitted sender) client-ip=10.50.195.231;
Authentication-Results: mr.google.com; spf=pass (google.com: domain of yselkowitz AT gmail DOT com designates 10.50.195.231 as permitted sender) smtp.mail=yselkowitz AT gmail DOT com; dkim=pass header.i=yselkowitz AT gmail DOT com
Message-ID: <1330479376.1848.35.camel@YAAKOV04>
Subject: Re: 'more' segment faults with latest cygwin1.dll (1.7.11)
From: "Yaakov (Cygwin/X)" <yselkowitz AT users DOT sourceforge DOT net>
To: cygwin AT cygwin DOT com
Date: Tue, 28 Feb 2012 19:36:16 -0600
In-Reply-To: <20120228102426.GF23052@calimero.vinschen.de>
References: <CAK-n8j4+JwjgjYwWOkR9Y9zMd1xzKDwd9F7w55aMG23CSRf9Kw AT mail DOT gmail DOT com> <20120227195959 DOT GC7534 AT calimero DOT vinschen DOT de> <1330384952 DOT 6720 DOT 20 DOT camel AT YAAKOV04> <20120228081859 DOT GA23052 AT calimero DOT vinschen DOT de> <1330422189 DOT 404 DOT 18 DOT camel AT YAAKOV04> <20120228102426 DOT GF23052 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
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 Tue, 2012-02-28 at 11:24 +0100, Corinna Vinschen wrote:
> On Feb 28 03:43, Yaakov (Cygwin/X) wrote:
> > On Tue, 2012-02-28 at 09:18 +0100, Corinna Vinschen wrote:
> > > It's a bug in more, afaics.  In case of pressing 'n', the search function
> > > is called with a NULL buf argument.  However, the function calls
> > > strlen(buf) without checking buf for NULL.  The indentation at this
> > > point in the file looks like this  `if (strlen(buf) > 0) {' has been
> > > added as a kind of patch.
> > 
> > Yes, I had to patch more(1) to use regcomp/regexec instead of
> > re_comp/re_exec, which we don't have on Cygwin.  With your clarification
> > I should be able to fix it easily.
> 
> Just an idea, instead of working around them, why not just add them
> to the lib?  You could copy the FreeBSD implementation which just
> implements them in terms of the regcomp/regexec API:
> 
> http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/lib/libcompat/4.3/re_comp.c?rev=1.1;content-type=text%2Fplain

I thought of that when I first ported util-linux, but these functions
were already marked legacy in SUSv2 and removed from SUSv3, so I wasn't
sure if we wanted to first add now what most libc's already consider
cruft.

If you really think this should be added to Cygwin, I could do it, but I
already have a fix for more(1) so I could do without.


Yaakov



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

- Raw text -


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