From 6b13c05da11e7735b4a50995c23ecf309d55a62d Mon Sep 17 00:00:00 2001 From: Erika Szelleova Date: Mon, 18 Jun 2018 19:47:17 +0200 Subject: [PATCH] OpcUa: fix in function getExtensionObjectType The function getExtensionObjectType was not reading the corrects bytes, this sometimes ended in reading outside the buffer and that way exception was raised even for correct packets. Bug: 14465 Change-Id: I5d7d9ca5f43f0afbc93f40487a78709c52f0658a Reviewed-on: https://code.wireshark.org/review/28328 Petri-Dish: Alexis La Goutte Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- plugins/epan/opcua/opcua_simpletypes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/epan/opcua/opcua_simpletypes.c b/plugins/epan/opcua/opcua_simpletypes.c index 7f9a7ff765..a787f21c35 100644 --- a/plugins/epan/opcua/opcua_simpletypes.c +++ b/plugins/epan/opcua/opcua_simpletypes.c @@ -1274,7 +1274,7 @@ guint32 getExtensionObjectType(tvbuff_t *tvb, gint *pOffset) Numeric = tvb_get_letohs(tvb, iOffset); break; case 0x02: /* numeric, that does not fit into four bytes */ - iOffset+=4; + iOffset+=2; Numeric = tvb_get_letohl(tvb, iOffset); break; case 0x03: /* string */