]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Correctly initialize payload length of encrypted payload
authorTobias Brunner <tobias@strongswan.org>
Fri, 28 Sep 2012 14:30:26 +0000 (16:30 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 28 Sep 2012 14:30:26 +0000 (16:30 +0200)
src/libcharon/encoding/payloads/encryption_payload.c

index c4d8d106ce079a3e536622ee2e5f09c3265ebccd..02e7b8bf37d57207a4f5f2ff2d03f0a39a15c410 100644 (file)
@@ -611,10 +611,10 @@ encryption_payload_t *encryption_payload_create(payload_type_t type)
                        .destroy = _destroy,
                },
                .next_payload = NO_PAYLOAD,
-               .payload_length = get_header_length(this),
                .payloads = linked_list_create(),
                .type = type,
        );
+       this->payload_length = get_header_length(this);
 
        if (type == ENCRYPTED_V1)
        {