From: Tobias Brunner Date: Thu, 8 Mar 2018 17:22:55 +0000 (+0100) Subject: proposal: Compress arrays after removing transforms X-Git-Tag: 5.6.3dr1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42a6b187f7d21369c175f90a57107398f8f0c904;p=thirdparty%2Fstrongswan.git proposal: Compress arrays after removing transforms --- diff --git a/src/libstrongswan/crypto/proposal/proposal.c b/src/libstrongswan/crypto/proposal/proposal.c index c18915fd75..39630a1688 100644 --- a/src/libstrongswan/crypto/proposal/proposal.c +++ b/src/libstrongswan/crypto/proposal/proposal.c @@ -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; }