[Pkg-gnupg-commit] [gnupg2] 89/132: gpgscm: Improve syntax checking.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed May 17 03:07:45 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit 4aab0e6ac7f2887a6f38f0cb95365dd7c30b4b18
Author: Justus Winter <justus at g10code.com>
Date: Thu Apr 20 15:09:13 2017 +0200
gpgscm: Improve syntax checking.
* tests/gpgscm/scheme.c (opexe_0): Make sure closure arguments are
symbols.
Signed-off-by: Justus Winter <justus at g10code.com>
---
tests/gpgscm/scheme.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index 11f6fcb..38f2870 100644
--- a/tests/gpgscm/scheme.c
+++ b/tests/gpgscm/scheme.c
@@ -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");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list