diff options
Diffstat (limited to 'plugins/opcua/opcua_extensionobjecttable.c')
-rw-r--r-- | plugins/opcua/opcua_extensionobjecttable.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/opcua/opcua_extensionobjecttable.c b/plugins/opcua/opcua_extensionobjecttable.c index 9ca5960b62..c829d8b5e0 100644 --- a/plugins/opcua/opcua_extensionobjecttable.c +++ b/plugins/opcua/opcua_extensionobjecttable.c @@ -197,7 +197,7 @@ void dispatchExtensionObjectType(proto_tree *tree, tvbuff_t *tvb, packet_info *p { if (iLen == -1) { - proto_tree_add_text(tree, tvb, *pOffset, 4, "[OpcUa Null ByteString]"); + proto_tree_add_bytes_format_value(tree, hf_opcua_ByteString, tvb, *pOffset, 4, NULL, "[OpcUa Null ByteString]"); } else if (iLen >= 0) { @@ -206,8 +206,7 @@ void dispatchExtensionObjectType(proto_tree *tree, tvbuff_t *tvb, packet_info *p } else { - char *szValue = wmem_strdup_printf(wmem_packet_scope(), "[Invalid ByteString] Invalid length: %d", iLen); - proto_tree_add_text(tree, tvb, *pOffset, 4, "%s", szValue); + proto_tree_add_bytes_format_value(tree, hf_opcua_ByteString, tvb, *pOffset, 4, NULL, "[Invalid ByteString] Invalid length: %d", iLen); } } |