Implemented hook to modify IKE header SPIs
[strongswan.git] / src / conftest / hooks / unencrypted_notify.c
index 1d7f42d..8737158 100644 (file)
@@ -80,7 +80,7 @@ METHOD(listener_t, ike_updown, bool,
                        data = chunk_skip(chunk_create(this->data, strlen(this->data)), 2);
                        data = chunk_from_hex(data, NULL);
                }
                        data = chunk_skip(chunk_create(this->data, strlen(this->data)), 2);
                        data = chunk_from_hex(data, NULL);
                }
-               else if (data.len)
+               else if (this->data && strlen(this->data))
                {
                        data = chunk_clone(chunk_create(this->data, strlen(this->data)));
                }
                {
                        data = chunk_clone(chunk_create(this->data, strlen(this->data)));
                }