[openssl-commits] [openssl] master update

Kurt Roeckx kurt at openssl.org
Tue May 24 19:36:32 UTC 2016


The branch master has been updated
       via  73b61c7e14115ae98c174bfdd7c7733d6cc7e909 (commit)
      from  04473165815e93c8453f6c0b55a5dd0b93f668fa (commit)


- Log -----------------------------------------------------------------
commit 73b61c7e14115ae98c174bfdd7c7733d6cc7e909
Author: Kurt Roeckx <kurt at roeckx.be>
Date:   Mon May 23 23:09:33 2016 +0200

    Avoid creating an illegal pointer
    
    Found by tis-interpreter
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    
    GH: #1115

-----------------------------------------------------------------------

Summary of changes:
 crypto/asn1/tasn_fre.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/crypto/asn1/tasn_fre.c b/crypto/asn1/tasn_fre.c
index 1471680..9b623d9 100644
--- a/crypto/asn1/tasn_fre.c
+++ b/crypto/asn1/tasn_fre.c
@@ -102,9 +102,11 @@ static void asn1_item_embed_free(ASN1_VALUE **pval, const ASN1_ITEM *it,
          * field and we wont be able to determine the type of the field it
          * defines. So free up in reverse order.
          */
-        tt = it->templates + it->tcount - 1;
-        for (i = 0; i < it->tcount; tt--, i++) {
+        tt = it->templates + it->tcount;
+        for (i = 0; i < it->tcount; i++) {
             ASN1_VALUE **pseqval;
+
+            tt--;
             seqtt = asn1_do_adb(pval, tt, 0);
             if (!seqtt)
                 continue;


More information about the openssl-commits mailing list