'more' segment faults with latest cygwin1.dll (1.7.11)

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Feb 28 11:31:00 GMT 2012


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


Corinna

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

--
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



More information about the Cygwin mailing list