[Pkg-gnupg-commit] [gnupg2] 13/132: gpgscm: Avoid mutating integer.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed May 17 03:07:35 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 f1dc34f502a68673e7a29f3fcf57b8dc6a4fac89
Author: Justus Winter <justus at g10code.com>
Date:   Thu Apr 6 16:24:49 2017 +0200

    gpgscm: Avoid mutating integer.
    
    * tests/gpgscm/scheme.c (opexe_5): Do not modify the integer in-place
    while printing an vector.  Integer objects may be shared, so they must
    not be mutated.
    
    Signed-off-by: Justus Winter <justus at g10code.com>
---
 tests/gpgscm/scheme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index 3719e53..aa0cf69 100644
--- a/tests/gpgscm/scheme.c
+++ b/tests/gpgscm/scheme.c
@@ -5181,7 +5181,7 @@ static pointer opexe_5(scheme *sc, enum scheme_opcodes op) {
                s_return(sc,sc->T);
           } else {
                pointer elem=vector_elem(vec,i);
-               ivalue_unchecked(cdr(sc->args))=i+1;
+               cdr(sc->args) = mk_integer(sc, i + 1);
                s_save(sc,OP_PVECFROM, sc->args, sc->NIL);
                sc->args=elem;
                if (i > 0)

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