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 <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Erika Szelleova 2018-06-18 19:47:17 +02:00 committed by Anders Broman
parent 11ba10dd4b
commit 6b13c05da1
1 changed files with 1 additions and 1 deletions

View File

@ -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 */