PROFINET: Multiple write in record dissection

COContainerContent dissects PDInterfaceMrpDataAdjust and
PDInterfaceMrpDataAdjust dissects remaining COContainerContent
because of offset problem. Offset problem is fixed.

(cherry picked from commit ccec04ede0591a5e83d2664c26ed5cb4481a6809)
(cherry picked from commit ecbe04e0bbc6634eaa6c54968870fee61760107c)
This commit is contained in:
Vahap Emin Agaogullari 2021-02-23 11:15:14 +00:00 committed by Wireshark GitLab Utility
parent 4a7ddb6b1a
commit 3e35fecccb
1 changed files with 38 additions and 38 deletions

View File

@ -5084,7 +5084,7 @@ dissect_PDInterfaceMrpDataAdjust_block(tvbuff_t *tvb, int offset,
guint16 u16Role; guint16 u16Role;
guint8 u8LengthDomainName; guint8 u8LengthDomainName;
guint8 u8NumberOfMrpInstances; guint8 u8NumberOfMrpInstances;
int iStartOffset = offset; int endoffset = offset + u16BodyLength;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow > 1) { /* added low version == 1 */ if (u8BlockVersionHigh != 1 || u8BlockVersionLow > 1) { /* added low version == 1 */
@ -5134,9 +5134,9 @@ dissect_PDInterfaceMrpDataAdjust_block(tvbuff_t *tvb, int offset,
/* Padding */ /* Padding */
offset = dissect_pn_align4(tvb, offset, pinfo, tree); offset = dissect_pn_align4(tvb, offset, pinfo, tree);
if ((offset - iStartOffset) < u16BodyLength) while (endoffset > offset)
{ {
offset = dissect_blocks(tvb, offset, pinfo, tree, drep); offset = dissect_a_block(tvb, offset, pinfo, tree, drep);
} }
} }
else if (u8BlockVersionLow == 1) /*dissect LowVersion == 1 */ else if (u8BlockVersionLow == 1) /*dissect LowVersion == 1 */