This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: screen on 64-bit mangles mintty/buffer


Hi Corinna,


On 2014-05-15 17:17+1000, Corinna Vinschen wrote:


Nice detective work, really.  The goldstar is well deservered :)

On May 15 04:00, Shaddy Baddah wrote:
I quickly worked out that the code has a bug for "%i". At some point
the code was changed to push and pop the parameters being passed (0 and
39 in my eg.). However, the "%i" select/case block was incrementing the
arguments in a no longer used array for parameters:


	    case 'i':
		if (p_is_s[0] == 0)
		    param[0]++;
		if (p_is_s[1] == 0)
		    param[1]++;
		break;

Unfortunately there's no newer upstream release and this bug is present
in the ncurses 5.9 version in Fedora 20 as well.  From what I gather from the
surrounding code, I *assume* something like this could fix it

             case 'i':
                 y = npop();
                 x = npop();
                 if (p_is_s[0] == 0)
                     y++;
                 if (p_is_s[1] == 0)
                     x++;
                 npush(x);
                 npush(y);
                 break;

I'm not sure the relation between x, y, and the p_is_s indices is
correct, though.

Yes, that's the code that I thought of as well, and same, I'd have to
get my head around the exact order of p_is_s (unfortunate name), etc.

When you say the bug is present in ncurses 5.9, is there any application
that is directly affected? I ask as screen being affected was sort of a
fluke. It's configure script should have detected terminfo notation was
available for use, and used the equivalent entry for "cs".

So I'm wondering if there are many applications still out there that are
trying to use the older, more terse termcap form? And also linking in
with ncurses?

Seems unlikely, as I would have expected that if there were, and any
were using a cap entry with "%i" that there would have been obvious
presentation problems.

--
Regards.
Shaddy


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]