diff options
author | Gerhard Gappmeier <gerhard.gappmeier@ascolab.com> | 2015-06-25 14:53:14 +0200 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2015-07-01 11:42:28 +0000 |
commit | f144ac433b80d8a6d377dbe39021007bbc5b137c (patch) | |
tree | e6a057a639b19c9b03818f631076c36647299116 /plugins | |
parent | 80c4addf2eb45fdb5755172e54ea7813939f5252 (diff) | |
download | wireshark-f144ac433b80d8a6d377dbe39021007bbc5b137c.tar.gz |
opcua dissector: Fix parsing of 7 byte numeric service NodeIds.
The service NodeIds of OPC UA are normally encoded as 4 byte numeric NodeId.
However, it is technically also possible to encode these as (less efficient) 7 byte numeric NodeId.
This kind of NodeId was already implemented, but wrong.
Since then no one ever used this kind of NodeId for service NodeIds.
Change-Id: I8654d969604e18bce8415931e455632e72d578ef
Reviewed-on: https://code.wireshark.org/review/9435
Reviewed-by: Anders Broman <a.broman58@gmail.com>
(cherry picked from commit 9c7acde7125b23fa8c74bd9f6f98a7e940e5c5c8)
Reviewed-on: https://code.wireshark.org/review/9436
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/opcua/opcua_application_layer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/opcua/opcua_application_layer.c b/plugins/opcua/opcua_application_layer.c index eeaf20bdd7..8402898a28 100644 --- a/plugins/opcua/opcua_application_layer.c +++ b/plugins/opcua/opcua_application_layer.c @@ -92,8 +92,8 @@ int parseServiceNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) iOffset+=2; break; case 0x02: /* numeric, that does not fit into four bytes */ - proto_tree_add_item(tree, hf_opcua_app_nsid, tvb, iOffset, 4, ENC_LITTLE_ENDIAN); - iOffset+=4; + proto_tree_add_item(tree, hf_opcua_app_nsid, tvb, iOffset, 2, ENC_LITTLE_ENDIAN); + iOffset+=2; Numeric = tvb_get_letohl(tvb, iOffset); proto_tree_add_item(tree, hf_opcua_app_numeric, tvb, iOffset, 4, ENC_LITTLE_ENDIAN); iOffset+=4; |