[gimp] Bug 738952 - Invalid syntax for (cond) causes a segfault
- From: Simon Budig <simon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 738952 - Invalid syntax for (cond) causes a segfault
- Date: Mon, 4 May 2015 18:04:55 +0000 (UTC)
commit b6946af0e1de3155cfe867e8cca5f927f0fcbe02
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 47c9f3e..06137db 100644
--- a/plug-ins/script-fu/tinyscheme/scheme.c
+++ b/plug-ins/script-fu/tinyscheme/scheme.c
@@ -3144,6 +3144,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]