mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-02 12:01:32 +01:00
gpgscm: Improve syntax checking.
* tests/gpgscm/scheme.c (opexe_0): Make sure closure arguments are symbols. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
ee715201ae
commit
4aab0e6ac7
@ -3559,10 +3559,13 @@ static pointer opexe_0(scheme *sc, enum scheme_opcodes op) {
|
||||
is_pair(x); x = cdr(x), y = cdr(y)) {
|
||||
if (y == sc->NIL) {
|
||||
Error_1(sc, "not enough arguments, missing:", x);
|
||||
} else {
|
||||
} else if (is_symbol(car(x))) {
|
||||
new_slot_in_env(sc, car(x), car(y));
|
||||
}
|
||||
} else {
|
||||
Error_1(sc, "syntax error in closure: not a symbol", car(x));
|
||||
}
|
||||
}
|
||||
|
||||
if (x == sc->NIL) {
|
||||
if (y != sc->NIL) {
|
||||
Error_0(sc, "too many arguments");
|
||||
|
Loading…
x
Reference in New Issue
Block a user