X-Recipient: archive-cygwin@delorie.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@gmail.com designates 10.50.47.198 as permitted sender) client-ip=10.50.47.198;
Authentication-Results: mr.google.com; spf=pass (google.com: domain of yselkowitz@gmail.com designates 10.50.47.198 as permitted sender) smtp.mail=yselkowitz@gmail.com; dkim=pass header.i=yselkowitz@gmail.com
Message-ID: <1330422189.404.18.camel@YAAKOV04>
Subject: Re: 'more' segment faults with latest cygwin1.dll (1.7.11)
From: "Yaakov (Cygwin/X)" <yselkowitz@users.sourceforge.net>
To: cygwin@cygwin.com
Date: Tue, 28 Feb 2012 03:43:09 -0600
In-Reply-To: <20120228081859.GA23052@calimero.vinschen.de>
References: <CAK-n8j4+JwjgjYwWOkR9Y9zMd1xzKDwd9F7w55aMG23CSRf9Kw@mail.gmail.com>	 <20120227195959.GC7534@calimero.vinschen.de>	 <1330384952.6720.20.camel@YAAKOV04>	 <20120228081859.GA23052@calimero.vinschen.de>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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.


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

