[vte/vte-next: 167/223] Revert "[CVE-2011-2198] Limit insert-blank-characters"
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-next: 167/223] Revert "[CVE-2011-2198] Limit insert-blank-characters"
- Date: Wed, 22 Jun 2011 21:02:38 +0000 (UTC)
commit feb08ec47bb31451d0df269fbe98ad72eacc72ed
Author: Christian Persch <chpe gnome org>
Date: Sat Jun 18 19:31:14 2011 +0200
Revert "[CVE-2011-2198] Limit insert-blank-characters"
This reverts commit cadfb9b5a43791034f38b562bb6f58d1b4513844.
src/vteseq.c | 27 +++++----------------------
1 files changed, 5 insertions(+), 22 deletions(-)
---
diff --git a/src/vteseq.c b/src/vteseq.c
index d23c915..e3e65d9 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -460,10 +460,9 @@ vte_sequence_handler_offset(VteTerminal *terminal,
/* Call another function a given number of times, or once. */
static void
-vte_sequence_handler_multiple_limited(VteTerminal *terminal,
- GValueArray *params,
- VteTerminalSequenceHandler handler,
- glong max)
+vte_sequence_handler_multiple(VteTerminal *terminal,
+ GValueArray *params,
+ VteTerminalSequenceHandler handler)
{
long val = 1;
int i;
@@ -473,29 +472,13 @@ vte_sequence_handler_multiple_limited(VteTerminal *terminal,
value = g_value_array_get_nth(params, 0);
if (G_VALUE_HOLDS_LONG(value)) {
val = g_value_get_long(value);
- val = CLAMP(val, 1, max); /* FIXME: vttest. */
+ val = MAX(val, 1); /* 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
@@ -1517,7 +1500,7 @@ vte_sequence_handler_ic (VteTerminal *terminal, GValueArray *params)
static void
vte_sequence_handler_IC (VteTerminal *terminal, GValueArray *params)
{
- vte_sequence_handler_multiple_r(terminal, params, vte_sequence_handler_ic);
+ vte_sequence_handler_multiple(terminal, params, vte_sequence_handler_ic);
}
/* Begin insert mode. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]