Fix conversion of user_data to security plugin

The security plugins currently use the standardized representations of
octet sequences, unlike the DDSI stack's internal representation.  A
shallow copy is therefore not simply a memcpy.

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2020-05-06 21:34:21 +02:00 committed by eboasson
parent bf25c6ec80
commit 02ed74e6bd

View file

@ -517,7 +517,7 @@ q_omg_shallow_copy_ParticipantBuiltinTopicDataSecure(
/* Copy the DDS_Security_OctetSeq content (length, pointer, etc), not the buffer content. */
if (plist->qos.present & QP_USER_DATA)
memcpy(&(dst->user_data.value), &(plist->qos.user_data.value), sizeof(DDS_Security_OctetSeq));
g_omg_shallow_copy_octSeq(&dst->user_data.value, &plist->qos.user_data);
/* Tokens are actually DataHolders. */
if (plist->present & PP_IDENTITY_TOKEN)
q_omg_shallow_copyin_DataHolder(&(dst->identity_token), &(plist->identity_token));