Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
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
From: Jim Meyering <jim@meyering.net>
To: Eric Blake <ebb9@byu.net>
Cc: bug-coreutils@gnu.org, cygwin@cygwin.com
Subject: Re: [Fwd: Strange-Dangerous behaviour in Cygwin]
In-Reply-To: <427CEB21.2010302@byu.net> (Eric Blake's message of "Sat, 07 May 2005 10:21:53 -0600")
References: <427CEB21.2010302@byu.net>
Date: Sat, 07 May 2005 19:24:29 +0200
Message-ID: <85ll6r3q5u.fsf@pi.meyering.net>
Lines: 21
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

Eric Blake <ebb9@byu.net> wrote:
> Relevant clips from this cygwin bug report.  When tty settings are weird
> (I'm not sure whether the bug is in cygwin, xterm, or just bad tty
> settings that could be reproduced elsewhere), backspace only repositions
> the cursor on screen, so that the actual buffer read by yesno() can
> contain "y\bn" instead of "n".  Is it possible for lib/yesno.c to be a
> little more paranoid and check that there are not embedded characters
> normally used in terminal editing that would undo the first character?

I don't think changing yesno would be appropriate in this case.

What if the string is "n\by"?
What if \b is not the erase character?
What if the string is "yes" and `e' is the `erase' character?
Should it handle both DEL and ERASE characters?
Should it also handle word-erase and line-erase characters?
I know you said `normally used...', so I assume you wanted
something simple, befitting yesno's status, but I don't see
an appropriate way to solve the problem by changing yesno.

Alternative opinions (or patches to yesno.c) welcome.

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

