summaryrefslogtreecommitdiff
path: root/x11/vte/patches/patch-aj
diff options
context:
space:
mode:
Diffstat (limited to 'x11/vte/patches/patch-aj')
-rw-r--r--x11/vte/patches/patch-aj60
1 files changed, 0 insertions, 60 deletions
diff --git a/x11/vte/patches/patch-aj b/x11/vte/patches/patch-aj
deleted file mode 100644
index f6b57574f67..00000000000
--- a/x11/vte/patches/patch-aj
+++ /dev/null
@@ -1,60 +0,0 @@
-$NetBSD: patch-aj,v 1.4 2011/06/15 13:44:40 drochner Exp $
-
-CVE-2011-2198 (patch from gnome bug #652124)
-
---- src/vteseq.c.orig 2010-08-09 11:38:44.000000000 +0000
-+++ src/vteseq.c
-@@ -532,9 +532,10 @@ vte_sequence_handler_offset(VteTerminal
-
- /* Call another function a given number of times, or once. */
- static void
--vte_sequence_handler_multiple(VteTerminal *terminal,
-- GValueArray *params,
-- VteTerminalSequenceHandler handler)
-+vte_sequence_handler_multiple_limited(VteTerminal *terminal,
-+ GValueArray *params,
-+ VteTerminalSequenceHandler handler,
-+ glong max)
- {
- long val = 1;
- int i;
-@@ -544,13 +545,29 @@ vte_sequence_handler_multiple(VteTermina
- value = g_value_array_get_nth(params, 0);
- if (G_VALUE_HOLDS_LONG(value)) {
- val = g_value_get_long(value);
-- val = MAX(val, 1); /* FIXME: vttest. */
-+ val = CLAMP(val, 1, max); /* FIXME: vttest. */
- }
- }
- for (i = 0; i < val; i++)
- handler (terminal, NULL);
- }
-
-+static void
-+vte_sequence_handler_multiple(VteTerminal *terminal,
-+ GValueArray *params,
-+ VteTerminalSequenceHandler handler)
-+{
-+ vte_sequence_handler_multiple_limited(terminal, params, handler, G_MAXLONG);
-+}
-+
-+static void
-+vte_sequence_handler_multiple_r(VteTerminal *terminal,
-+ GValueArray *params,
-+ VteTerminalSequenceHandler handler)
-+{
-+ vte_sequence_handler_multiple_limited(terminal, params, handler,
-+ terminal->column_count - terminal->pvt->screen->cursor_current.col);
-+}
-
- /* Manipulate certain terminal attributes. */
- static void
-@@ -1570,7 +1587,7 @@ vte_sequence_handler_ic (VteTerminal *te
- static void
- vte_sequence_handler_IC (VteTerminal *terminal, GValueArray *params)
- {
-- vte_sequence_handler_multiple(terminal, params, vte_sequence_handler_ic);
-+ vte_sequence_handler_multiple_r(terminal, params, vte_sequence_handler_ic);
- }
-
- /* Begin insert mode. */