[Pkg-gnupg-commit] [gnupg2] 44/160: gpgscm: Fix Scheme initialization.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Fri Jul 15 09:36:35 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch upstream
in repository gnupg2.

commit e6e56adf208f194ecafda29bb1c1c06655348432
Author: Justus Winter <justus at g10code.com>
Date:   Thu Jun 23 14:10:00 2016 +0200

    gpgscm: Fix Scheme initialization.
    
    This potentially causes a crash if the garbage collector marks an eof
    object.
    
    * tests/gpgscm/scheme.c (scheme_init_custom_alloc): Initialize
    'EOF_OBJ'.
    
    Signed-off-by: Justus Winter <justus at g10code.com>
---
 tests/gpgscm/scheme.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index 3c7910c..3ed5d9b 100644
--- a/tests/gpgscm/scheme.c
+++ b/tests/gpgscm/scheme.c
@@ -4778,6 +4778,9 @@ int scheme_init_custom_alloc(scheme *sc, func_alloc malloc, func_dealloc free) {
   /* init F */
   typeflag(sc->F) = (T_ATOM | MARK);
   car(sc->F) = cdr(sc->F) = sc->F;
+  /* init EOF_OBJ */
+  typeflag(sc->EOF_OBJ) = (T_ATOM | MARK);
+  car(sc->EOF_OBJ) = cdr(sc->EOF_OBJ) = sc->EOF_OBJ;
   /* init sink */
   typeflag(sc->sink) = (T_PAIR | MARK);
   car(sc->sink) = sc->NIL;

-- 
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