[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-229-g2a4fdb1)
The branch, master has been updated
via 2a4fdb13021d0153e788fe3b2fc005f273dcdf4b (commit)
from 67b4f6d41a25e4847f0f611512c1c44887a18d49 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gnetlist/src/gnetlist.c | 2 +-
gschem/src/g_keys.c | 2 +-
gschem/src/x_menus.c | 2 +-
gschem/src/x_stroke.c | 2 +-
libgeda/src/g_basic.c | 4 +++-
5 files changed, 7 insertions(+), 5 deletions(-)
=================
Commit Messages
=================
commit 2a4fdb13021d0153e788fe3b2fc005f273dcdf4b
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Tue Oct 21 16:52:09 2008 +0100
Validate calls to scm_c_eval_string(). [2105219]
Because the reporter's version of Guile is broken, a lovely garbage
collector segfault occurs if a null string is passed to
scm_c_eval_string().
For now, wrap all calls to scm_c_eval_string() with mutable arguments
in g_scm_c_eval_string_protected(), and since the latter function
seems to behave when passed a NULL string this bug should just go
away.
:100644 100644 957d0f6... 5192560... M gnetlist/src/gnetlist.c
:100644 100644 f1dee56... b3687db... M gschem/src/g_keys.c
:100644 100644 4c80cda... b59f3cd... M gschem/src/x_menus.c
:100644 100644 08da5f1... ddd0fe5... M gschem/src/x_stroke.c
:100644 100644 540761d... c37e6e8... M libgeda/src/g_basic.c
=========
Changes
=========
commit 2a4fdb13021d0153e788fe3b2fc005f273dcdf4b
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Tue Oct 21 16:52:09 2008 +0100
Validate calls to scm_c_eval_string(). [2105219]
Because the reporter's version of Guile is broken, a lovely garbage
collector segfault occurs if a null string is passed to
scm_c_eval_string().
For now, wrap all calls to scm_c_eval_string() with mutable arguments
in g_scm_c_eval_string_protected(), and since the latter function
seems to behave when passed a NULL string this bug should just go
away.
diff --git a/gnetlist/src/gnetlist.c b/gnetlist/src/gnetlist.c
index 957d0f6..5192560 100644
--- a/gnetlist/src/gnetlist.c
+++ b/gnetlist/src/gnetlist.c
@@ -326,7 +326,7 @@ void main_prog(void *closure, int argc, char *argv[])
if (guile_proc) {
/* check size here hack */
sprintf(input_str, "(%s \"%s\")", guile_proc, output_filename);
- scm_c_eval_string (input_str);
+ g_scm_c_eval_string_protected (input_str);
/* gh_eval_str_with_stack_saving_handler (input_str); */
} else if (interactive_mode) {
scm_c_eval_string ("(set-repl-prompt! \"gnetlist> \")");
diff --git a/gschem/src/g_keys.c b/gschem/src/g_keys.c
index f1dee56..b3687db 100644
--- a/gschem/src/g_keys.c
+++ b/gschem/src/g_keys.c
@@ -104,7 +104,7 @@ int g_keys_execute(GSCHEM_TOPLEVEL *w_current, int state, int keyval)
#if DEBUG
printf("_%s_\n", guile_string);
#endif
- scm_retval = scm_c_eval_string (guile_string);
+ scm_retval = g_scm_c_eval_string_protected (guile_string);
g_free(guile_string);
g_free(modifier);
diff --git a/gschem/src/x_menus.c b/gschem/src/x_menus.c
index 4c80cda..b59f3cd 100644
--- a/gschem/src/x_menus.c
+++ b/gschem/src/x_menus.c
@@ -156,7 +156,7 @@ void get_main_menu(GtkWidget ** menubar)
gtk_menu_append(GTK_MENU(menu), menu_item);
} else {
buf = g_strdup_printf("(find-key '%s)", menu_item_hotkey_func);
- scm_keys = scm_c_eval_string (buf);
+ scm_keys = g_scm_c_eval_string_protected (buf);
g_free(buf);
if (scm_keys == SCM_BOOL_F) {
menu_item_keys = g_strdup (" ");
diff --git a/gschem/src/x_stroke.c b/gschem/src/x_stroke.c
index 08da5f1..ddd0fe5 100644
--- a/gschem/src/x_stroke.c
+++ b/gschem/src/x_stroke.c
@@ -151,7 +151,7 @@ x_stroke_translate_and_execute (GSCHEM_TOPLEVEL *w_current)
g_strdup_printf("(eval-stroke \"%s\")", sequence);
SCM ret;
- ret = scm_c_eval_string (guile_string);
+ ret = g_scm_c_eval_string_protected (guile_string);
g_free (guile_string);
diff --git a/libgeda/src/g_basic.c b/libgeda/src/g_basic.c
index 540761d..c37e6e8 100644
--- a/libgeda/src/g_basic.c
+++ b/libgeda/src/g_basic.c
@@ -209,7 +209,9 @@ static SCM protected_body_eval_string (void *data)
* \returns Evaluation results or SCM_BOOL_F if exception caught.
*/
SCM g_scm_c_eval_string_protected (const gchar *str) {
- SCM s_str = scm_from_locale_string (str);
+ SCM s_str;
+ g_return_val_if_fail ((str != NULL), SCM_BOOL_F);
+ s_str = scm_from_locale_string (str);
return g_scm_eval_string_protected (s_str);
}
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs