From: root Date: Wed, 11 Jan 2006 05:14:26 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=deb8320877c5e6bcf4f83b0e856ecf48f48adefb;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/Changes b/Changes index 2146de3d..5632cd03 100644 --- a/Changes +++ b/Changes @@ -6,12 +6,13 @@ TODO: "slow" rendering mode for bidi and scripts TODO: read property sequence is broken with respect to utf-8 etc. TODO: http://www120.pair.com/mccarthy/nextstep/intro.htmld/Workspace.html is the correct nextstep look. TODO: clarify and get rid of SMOOTH_REFRESH etc. -TODO: run external commands more sytematically (using $self->env etc.) -WISH: OnTheSpot editing, or maybe switch to miiiiiiif +WISH: OnTheSpot editing, or maybe switch to miiiiiiif. or maybe use perl and an overlay... WISH: just for fun, do shade and tint with XRender. WISH: support tex fonts 7.0 +TODO: run external commands more sytematically (using $self->env etc.) +TODO: document searchable-scorllback hotkey - added sections for DISTRIBUTION MAINTAINERS and about SETUID/SETGID to the FAQ. - selection, searchable-scrollback, selection-popup and @@ -37,6 +38,9 @@ WISH: support tex fonts compatible, and not really small either. - removed PATH_ENV and PATH file search support. - removed support for locale-specific app-defaults file. + - fixed a bug where out-of-bounds colour sequences could lead + to crashes. + - XTerm_Color01 sequence returned wrong results in query mode. 6.3 Wed Jan 4 22:37:10 CET 2006 - SECURITY FIX: on systems using openpty, permissions were diff --git a/src/command.C b/src/command.C index 2641c224..e5692203 100644 --- a/src/command.C +++ b/src/command.C @@ -3860,9 +3860,9 @@ rxvt_term::process_xterm_seq (int op, const char *str, char resp) break; *name++ = '\0'; - color = atoi (buf); + color = atoi (buf) + minCOLOR; - if (color < 0 || color >= TOTAL_COLORS) + if (!IN_RANGE_EXC (color, minCOLOR, TOTAL_COLORS)) break; if ((buf = strchr (name, ';')) != NULL) @@ -3871,18 +3871,18 @@ rxvt_term::process_xterm_seq (int op, const char *str, char resp) if (name[0] == '?' && !name[1]) { unsigned short r, g, b; - pix_colors_focused[color + minCOLOR].get (display, r, g, b); + pix_colors_focused[color].get (display, r, g, b); tt_printf ("\033]%d;%d;rgb:%04x/%04x/%04x%c", XTerm_Color, color, r, g, b, resp); } else - set_window_color (color + minCOLOR, name); + set_window_color (color, name); } break; case XTerm_Color00: process_color_seq (XTerm_Color00, Color_fg, str, resp); break; case XTerm_Color01: - process_color_seq (XTerm_Color00, Color_bg, str, resp); + process_color_seq (XTerm_Color01, Color_bg, str, resp); break; #ifndef NO_CURSORCOLOR case XTerm_Color_cursor: @@ -3924,9 +3924,10 @@ rxvt_term::process_xterm_seq (int op, const char *str, char resp) #if XPM_BACKGROUND scale_pixmap (""); /* reset to default scaling */ set_bgPixmap (str); /* change pixmap */ -#endif scr_touch (true); +#endif } + while ((str = strchr (str, ';')) != NULL) { str++; @@ -3939,8 +3940,8 @@ rxvt_term::process_xterm_seq (int op, const char *str, char resp) { #ifdef XPM_BACKGROUND resize_pixmap (); -#endif scr_touch (true); +#endif } break; diff --git a/src/main.C b/src/main.C index 5d55faa1..5959dd4f 100644 --- a/src/main.C +++ b/src/main.C @@ -286,7 +286,6 @@ rxvt_term::~rxvt_term () } // TODO: free pixcolours, colours should become part of rxvt_display - delete pix_colors_focused; #if OFF_FOCUS_FADING delete pix_colors_unfocused; diff --git a/src/screen.C b/src/screen.C index 1478194c..2b7cff84 100644 --- a/src/screen.C +++ b/src/screen.C @@ -574,7 +574,7 @@ rxvt_term::scr_do_wrap () void rxvt_term::scr_color (unsigned int color, int fgbg) { - if (color > maxTermCOLOR) + if (!IN_RANGE_INC (color, minTermCOLOR, maxTermCOLOR)) color = fgbg; if (fgbg == Color_fg)