510541d6d6
- apply a security fix for CVE-2008-2383 from Todd Carson ok maintainer
68 lines
2.0 KiB
Plaintext
68 lines
2.0 KiB
Plaintext
$OpenBSD: patch-misc_c,v 1.1 2011/03/16 22:53:31 jasper Exp $
|
|
fix for CVE 2008-2383
|
|
from http://soojung.kldp.net/projects/hanterm-xf/issue/305253
|
|
--- misc.c.orig Thu Mar 30 00:10:51 2006
|
|
+++ misc.c Wed Mar 2 23:11:14 2011
|
|
@@ -1443,10 +1443,6 @@ do_osc(Char * oscbuf, int len GCC_UNUSED, int final)
|
|
case 2: /* new title only */
|
|
Changetitle(buf);
|
|
break;
|
|
-
|
|
- case 3: /* change X property */
|
|
- ChangeXprop(buf);
|
|
- break;
|
|
#if OPT_ISO_COLORS
|
|
case 4:
|
|
ChangeAnsiColorRequest(term, buf, final);
|
|
@@ -1492,6 +1488,7 @@ do_osc(Char * oscbuf, int len GCC_UNUSED, int final)
|
|
#endif /* ALLOWLOGGING */
|
|
|
|
case 50:
|
|
+#if 0
|
|
if (buf != 0 && !strcmp(buf, "?")) {
|
|
int num = screen->menu_font_number;
|
|
|
|
@@ -1544,6 +1541,7 @@ do_osc(Char * oscbuf, int len GCC_UNUSED, int final)
|
|
}
|
|
SetVTFont(fontMenu_fontescape, True, VT_FONTSET(buf, NULL, NULL, NULL));
|
|
}
|
|
+#endif
|
|
break;
|
|
case 51:
|
|
/* reserved for Emacs shell (Rob Myoff <mayoff@dqd.com>) */
|
|
@@ -1706,14 +1704,17 @@ do_dcs(Char * dcsbuf, size_t dcslen)
|
|
} else
|
|
okay = False;
|
|
|
|
- unparseputc1(DCS, screen->respond);
|
|
- unparseputc(okay ? '1' : '0', screen->respond);
|
|
- unparseputc('$', screen->respond);
|
|
- unparseputc('r', screen->respond);
|
|
- if (okay)
|
|
+ if (okay) {
|
|
+ unparseputc1(DCS, screen->respond);
|
|
+ unparseputc(okay ? '1' : '0', screen->respond);
|
|
+ unparseputc('$', screen->respond);
|
|
+ unparseputc('r', screen->respond);
|
|
cp = reply;
|
|
- unparseputs(cp, screen->respond);
|
|
- unparseputc1(ST, screen->respond);
|
|
+ unparseputs(cp, screen->respond);
|
|
+ unparseputc1(ST, screen->respond);
|
|
+ } else {
|
|
+ unparseputc(CAN, screen->respond);
|
|
+ }
|
|
} else {
|
|
unparseputc(CAN, screen->respond);
|
|
}
|
|
@@ -1763,7 +1764,8 @@ do_dcs(Char * dcsbuf, size_t dcslen)
|
|
break;
|
|
#endif
|
|
default:
|
|
- if (isdigit(CharOf(*cp))) { /* digits are DECUDK, otherwise ignore */
|
|
+ /* VT220; digits are DECUDK, otherwise ignore */
|
|
+ if (screen->terminal_id >= 200 && isdigit(CharOf(*cp))) {
|
|
clear_all = True;
|
|
lock_keys = True;
|
|
|