[6606] in bugtraq
Re: pine/pico vt control characters bug
daemon@ATHENA.MIT.EDU (der Mouse)
Sat Apr 25 18:50:21 1998
Date: Sat, 25 Apr 1998 18:26:21 -0400
Reply-To: der Mouse <mouse@RODENTS.MONTREAL.QC.CA>
From: der Mouse <mouse@RODENTS.MONTREAL.QC.CA>
To: BUGTRAQ@NETSPACE.ORG
> Pico, an editor included with pine 3.96 package, handles vt control
> characters (eg. 0x9B) improperly, so it's possible to do almost
> anything when normal text file is viewed with pico.
This depends entirely on the terminal (or emulator) in use; I just now
tried sending 0x9b 0x63 to one of my windows and got a greater-or-equal
sign and a lowercase c, nothing odd at all.
> - else if (c.c < 0x20 || c.c == 0x7F) {
> + else if (c.c < 0x20 || c.c == 0x7F || c.c == 0x9B) {
If you're going to blindly assume 00-20, 7f, and 9b, you probably want
to hit all of C1 space as well, as in
+ else if (c.c < 0x20 || (c.c >= 0x7F && c.c <= 0x9F)) {
(I'm assuming c.c is a specifically unsigned char, or something wider
than a char, or the "< 0x20" test breaks the whole high half anyway).
der Mouse
mouse@rodents.montreal.qc.ca
7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B