gimp r25677 - in trunk: . plug-ins/script-fu/tinyscheme



Author: kcozens
Date: Fri May 16 20:22:01 2008
New Revision: 25677
URL: http://svn.gnome.org/viewvc/gimp?rev=25677&view=rev

Log:
2008-05-16  Kevin Cozens  <kcozens cvs gnome org>

	* plug-ins/script-fu/tinyscheme/scheme.c: Added extra checks to stop
	bad syntax in LET from causing a segmentation fault in Linux.
	See bug #508020.


Modified:
   trunk/ChangeLog
   trunk/plug-ins/script-fu/tinyscheme/scheme.c

Modified: trunk/plug-ins/script-fu/tinyscheme/scheme.c
==============================================================================
--- trunk/plug-ins/script-fu/tinyscheme/scheme.c	(original)
+++ trunk/plug-ins/script-fu/tinyscheme/scheme.c	Fri May 16 20:22:01 2008
@@ -2763,7 +2763,7 @@
           sc->args = cons(sc, sc->value, sc->args);
           if (is_pair(sc->code)) { /* continue */
                if (!is_pair(car(sc->code)) || !is_pair(cdar(sc->code))) {
-                    Error_1(sc,"Bad syntax of binding spec in let :",car(sc->code));
+                    Error_1(sc, "Bad syntax of binding spec in let :", car(sc->code));
                }
                s_save(sc,OP_LET1, sc->args, cdr(sc->code));
                sc->code = cadar(sc->code);
@@ -2783,6 +2783,8 @@
                new_slot_in_env(sc, caar(x), car(y));
           }
           if (is_symbol(car(sc->code))) {    /* named let */
+               if (!is_pair(cadr(sc->code)))
+                    Error_1(sc, "Bad syntax of binding spec in let :", car(sc->code));
                for (x = cadr(sc->code), sc->args = sc->NIL; x != sc->NIL; x = cdr(x)) {
 
                     sc->args = cons(sc, caar(x), sc->args);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]