[git] GCRYPT - branch, LIBGCRYPT-1-5-BRANCH, updated. libgcrypt-1.5.5-2-g74504ac
by Justus Winter
cvs at cvs.gnupg.org
Fri Apr 15 16:10:43 CEST 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".
The branch, LIBGCRYPT-1-5-BRANCH has been updated
via 74504ac9b0af567fe5b8f6ac5c7e7a9e59f0b348 (commit)
from 3128e444aa9c9eaca15ba696d5056da7a61e7cb3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 74504ac9b0af567fe5b8f6ac5c7e7a9e59f0b348
Author: Justus Winter <justus at g10code.com>
Date: Thu Apr 14 13:53:55 2016 +0200
src: Improve S-expression parsing.
* src/sexp.c (do_vsexp_sscan): Return an error if a closing
parenthesis is encountered with no matching opening parenthesis.
Signed-off-by: Justus Winter <justus at g10code.com>
diff --git a/src/sexp.c b/src/sexp.c
index 78013fd..baca5a5 100644
--- a/src/sexp.c
+++ b/src/sexp.c
@@ -1472,6 +1472,13 @@ vsexp_sscan (gcry_sexp_t *retsexp, size_t *erroff,
err = GPG_ERR_SEXP_UNMATCHED_DH;
goto leave;
}
+
+ if (level == 0)
+ {
+ *erroff = p - buffer;
+ err = GPG_ERR_SEXP_UNMATCHED_PAREN;
+ goto leave;
+ }
MAKE_SPACE (0);
*c.pos++ = ST_CLOSE;
level--;
-----------------------------------------------------------------------
Summary of changes:
src/sexp.c | 7 +++++++
1 file changed, 7 insertions(+)
hooks/post-receive
--
The GNU crypto library
http://git.gnupg.org
More information about the Gnupg-commits
mailing list