[gimp/gimp-2-8] Bug 738952 - Invalid syntax for (cond) causes a segfault
- From: Simon Budig <simon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] Bug 738952 - Invalid syntax for (cond) causes a segfault
- Date: Mon, 4 May 2015 18:08:27 +0000 (UTC)
commit e9b4fb163b207fcfef7ccfbdb95f39a680ddace7
Author: Simon Budig <simon budig de>
Date: Mon May 4 20:03:02 2015 +0200
Bug 738952 - Invalid syntax for (cond) causes a segfault
Segfault in script-fu, spotted by Pedro Gimeno.
plug-ins/script-fu/tinyscheme/scheme.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/script-fu/tinyscheme/scheme.c b/plug-ins/script-fu/tinyscheme/scheme.c
index b07f15c..5ef5c5c 100644
--- a/plug-ins/script-fu/tinyscheme/scheme.c
+++ b/plug-ins/script-fu/tinyscheme/scheme.c
@@ -3116,6 +3116,9 @@ static pointer opexe_1(scheme *sc, enum scheme_opcodes op) {
if ((sc->code = cdar(sc->code)) == sc->NIL) {
s_return(sc,sc->value);
}
+ if(!sc->code) {
+ Error_0(sc,"syntax error in cond");
+ }
if(car(sc->code)==sc->FEED_TO) {
if(!is_pair(cdr(sc->code))) {
Error_0(sc,"syntax error in cond");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]