From a6a847f4e7bda981b38b23533eb081505fc30e40 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Fri, 10 Jul 2009 15:42:22 +0000 Subject: [PATCH] Don't use g_alloca() with selected text, it may be too long. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3950 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- src/keybindings.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/keybindings.c b/src/keybindings.c index 5df754e8..6c259322 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -1292,10 +1292,10 @@ static void cb_func_search_action(guint key_id) case GEANY_KEYS_SEARCH_MARKALL: if (sci_has_selection(sci)) { - gchar *text = g_alloca(sci_get_selected_text_length(sci) + 1); + gchar *text = sci_get_selection_contents(sci); - sci_get_selected_text(sci, text); search_mark_all(doc, text, SCFIND_MATCHCASE); + g_free(text); } else {