[Fwd: Strange-Dangerous behaviour in Cygwin]
Jim Meyering
jim@meyering.net
Sat May 7 17:25:00 GMT 2005
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/
More information about the Cygwin
mailing list