[vte/vte-0-36] widget: Don't try to allocate arbitrary amount of memory.
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-0-36] widget: Don't try to allocate arbitrary amount of memory.
- Date: Fri, 17 Jan 2014 02:43:37 +0000 (UTC)
commit de31abd9d5eb101530f6e9096c6e930230cb1f6d
Author: Egmont Koblinger <egmont gmail com>
Date: Fri Jan 17 03:40:14 2014 +0100
widget: Don't try to allocate arbitrary amount of memory.
src/vte.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/vte.c b/src/vte.c
index 1f8cded..8bee98f 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -3107,6 +3107,8 @@ vte_terminal_set_colors_rgba(VteTerminal *terminal,
GdkColor fg, bg, *pal;
gsize i;
+ g_return_if_fail(palette_size <= 256);
+
pal = g_new (GdkColor, palette_size);
for (i = 0; i < palette_size; ++i)
gdk_color_from_rgba(&pal[i], &palette[i]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]