]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
proposal: Compress arrays after removing transforms
authorTobias Brunner <tobias@strongswan.org>
Thu, 8 Mar 2018 17:22:55 +0000 (18:22 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 21 Mar 2018 09:15:18 +0000 (10:15 +0100)
src/libstrongswan/crypto/proposal/proposal.c

index c18915fd75220a3005a803f58d7b604d5623e78b..39630a168851a7ca55ab7cd61161a09695a318f3 100644 (file)
@@ -325,10 +325,12 @@ METHOD(proposal_t, strip_dh, void,
                }
        }
        enumerator->destroy(enumerator);
+       array_compress(this->transforms);
 
        if (keep == MODP_NONE || !found)
        {
                remove_type(this, DIFFIE_HELLMAN_GROUP);
+               array_compress(this->types);
        }
 }
 
@@ -761,6 +763,7 @@ static bool check_proposal(private_proposal_t *this)
        }
 
        array_compress(this->transforms);
+       array_compress(this->types);
        return TRUE;
 }