diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 17:44:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 17:44:25 +0000 |
commit | f59ea5f7690c9a01ef6f7f6508084a66c40b1dae (patch) | |
tree | 482ee255d71f113be6c62e9ff3543fd6ebb9f12a /plugins | |
parent | Releasing progress-linux version 4.2.2-1.1~progress7.99u1. (diff) | |
download | wireshark-f59ea5f7690c9a01ef6f7f6508084a66c40b1dae.tar.xz wireshark-f59ea5f7690c9a01ef6f7f6508084a66c40b1dae.zip |
Merging upstream version 4.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/epan/gryphon/packet-gryphon.c | 11 | ||||
-rw-r--r-- | plugins/epan/opcua/opcua.c | 2 | ||||
-rw-r--r-- | plugins/epan/opcua/opcua_simpletypes.c | 11 | ||||
-rw-r--r-- | plugins/epan/profinet/packet-dcerpc-pn-io.c | 49 | ||||
-rw-r--r-- | plugins/epan/wimaxasncp/packet-wimaxasncp.c | 4 |
5 files changed, 75 insertions, 2 deletions
diff --git a/plugins/epan/gryphon/packet-gryphon.c b/plugins/epan/gryphon/packet-gryphon.c index 6df68a31..08da00fd 100644 --- a/plugins/epan/gryphon/packet-gryphon.c +++ b/plugins/epan/gryphon/packet-gryphon.c @@ -1118,6 +1118,7 @@ decode_event(tvbuff_t *tvb, int offset, proto_tree *pt) } static int +// NOLINTNEXTLINE(misc-no-recursion) decode_misc (tvbuff_t *tvb, int offset, packet_info* pinfo, proto_tree *pt) { tvbuff_t *next_tvb; @@ -2715,6 +2716,7 @@ resp_restore_session(tvbuff_t *tvb, int offset, proto_tree *pt) } static int +// NOLINTNEXTLINE(misc-no-recursion) cmd_addresp(tvbuff_t *tvb, int offset, packet_info* pinfo, proto_tree *pt) { proto_item *item; @@ -3700,6 +3702,7 @@ get_conversation_data(packet_info* pinfo) } static int +// NOLINTNEXTLINE(misc-no-recursion) decode_command(tvbuff_t *tvb, packet_info* pinfo, int msglen, int offset, int dst, proto_tree *pt) { guint32 cmd; @@ -3751,6 +3754,7 @@ decode_command(tvbuff_t *tvb, packet_info* pinfo, int msglen, int offset, int ds ft = proto_tree_add_subtree_format(pt, tvb, offset, msglen, ett_gryphon_command_data, NULL, "Data: (%d byte%s)", msglen, plurality(msglen, "", "s")); + increment_dissection_depth(pinfo); switch (cmd) { case CMD_INIT: @@ -3958,12 +3962,14 @@ decode_command(tvbuff_t *tvb, packet_info* pinfo, int msglen, int offset, int ds offset += msglen; break; } + decrement_dissection_depth(pinfo); } return offset; } static int +// NOLINTNEXTLINE(misc-no-recursion) decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tree *pt) { int msglen; @@ -4042,6 +4048,7 @@ decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tr ft = proto_tree_add_subtree_format(pt, tvb, offset, msglen, ett_gryphon_response_data, NULL, "Data: (%d byte%s)", msglen, plurality(msglen, "", "s")); + increment_dissection_depth(pinfo); switch (cmd) { case CMD_GET_CONFIG: @@ -4191,6 +4198,7 @@ decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tr proto_tree_add_item(ft, hf_gryphon_data, tvb, offset, msglen, ENC_NA); offset += msglen; } + decrement_dissection_depth(pinfo); } return offset; @@ -4202,6 +4210,7 @@ decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tr * So, this function will decode a packet and return the offset. */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean is_msgresp_add) { proto_tree *gryphon_tree; @@ -4273,6 +4282,7 @@ dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gbo body_tree = proto_tree_add_subtree(gryphon_tree, tvb, offset, msglen, ett_gryphon_body, NULL, "Body"); + increment_dissection_depth(pinfo); switch (frmtyp) { case GY_FT_CMD: offset = decode_command(tvb, pinfo, msglen, offset, dest, body_tree); @@ -4299,6 +4309,7 @@ dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gbo proto_tree_add_item(body_tree, hf_gryphon_data, tvb, offset, msglen, ENC_NA); break; } + decrement_dissection_depth(pinfo); /*debug*/ /*i = msgend - offset;*/ diff --git a/plugins/epan/opcua/opcua.c b/plugins/epan/opcua/opcua.c index 7eec5b69..33d966a9 100644 --- a/plugins/epan/opcua/opcua.c +++ b/plugins/epan/opcua/opcua.c @@ -282,7 +282,7 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree * arbitrary value, so we have to fake the numbers in the stored fragments. this way Wireshark reassembles the message, as it expects the fragment sequence numbers to start at 0 */ - for (frag_i = frag_msg->next; frag_i; frag_i = frag_i->next) {} + for (frag_i = frag_msg->next; frag_i && frag_i->next; frag_i = frag_i->next) {} if (frag_i) { opcua_seqnum = frag_i->offset + 1; } else { diff --git a/plugins/epan/opcua/opcua_simpletypes.c b/plugins/epan/opcua/opcua_simpletypes.c index e913ac69..24bcbbce 100644 --- a/plugins/epan/opcua/opcua_simpletypes.c +++ b/plugins/epan/opcua/opcua_simpletypes.c @@ -793,6 +793,7 @@ proto_item* parseDateTime(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U return item; } +// NOLINTNEXTLINE(misc-no-recursion) void parseDiagnosticInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName) { static int * const diag_mask[] = {&hf_opcua_diag_mask_symbolicflag, @@ -827,6 +828,7 @@ void parseDiagnosticInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi proto_tree_add_bitmask(subtree, tvb, iOffset, hf_opcua_diag_mask, ett_opcua_diagnosticinfo_encodingmask, diag_mask, ENC_LITTLE_ENDIAN); iOffset++; + increment_dissection_depth(pinfo); if (EncodingMask & DIAGNOSTICINFO_ENCODINGMASK_SYMBOLICID_FLAG) { parseInt32(subtree, tvb, pinfo, &iOffset, hf_opcua_diag_symbolicid); @@ -855,6 +857,7 @@ void parseDiagnosticInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi { parseDiagnosticInfo(subtree, tvb, pinfo, &iOffset, "Inner DiagnosticInfo"); } + decrement_dissection_depth(pinfo); proto_item_set_end(ti, tvb, iOffset); *pOffset = iOffset; @@ -875,6 +878,7 @@ void parseQualifiedName(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gin proto_item_set_end(ti, tvb, *pOffset); } +// NOLINTNEXTLINE(misc-no-recursion) void parseDataValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName) { static int * const datavalue_mask[] = {&hf_opcua_datavalue_mask_valueflag, @@ -895,6 +899,7 @@ void parseDataValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *p proto_tree_add_bitmask(subtree, tvb, iOffset, hf_opcua_datavalue_mask, ett_opcua_datavalue_encodingmask, datavalue_mask, ENC_LITTLE_ENDIAN); iOffset++; + increment_dissection_depth(pinfo); if (EncodingMask & DATAVALUE_ENCODINGBYTE_VALUE) { parseVariant(subtree, tvb, pinfo, &iOffset, "Value"); @@ -919,11 +924,13 @@ void parseDataValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *p { parseUInt16(subtree, tvb, pinfo, &iOffset, hf_opcua_ServerPicoseconds); } + decrement_dissection_depth(pinfo); proto_item_set_end(ti, tvb, iOffset); *pOffset = iOffset; } +// NOLINTNEXTLINE(misc-no-recursion) void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName) { proto_item *ti; @@ -951,6 +958,7 @@ void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOf if (EncodingMask & VARIANT_ARRAYMASK) { /* type is encoded in bits 0-5 */ + increment_dissection_depth(pinfo); switch(EncodingMask & 0x3f) { case OpcUaType_Null: break; @@ -980,6 +988,7 @@ void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOf case OpcUaType_DataValue: parseArrayComplex(subtree, tvb, pinfo, &iOffset, "DataValue", "DataValue", parseDataValue, ett_opcua_array_DataValue); break; case OpcUaType_Variant: parseArrayComplex(subtree, tvb, pinfo, &iOffset, "Variant", "Variant", parseVariant, ett_opcua_array_Variant); break; } + decrement_dissection_depth(pinfo); if (EncodingMask & VARIANT_ARRAYDIMENSIONS) { @@ -1009,6 +1018,7 @@ void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOf else { /* type is encoded in bits 0-5 */ + increment_dissection_depth(pinfo); switch(EncodingMask & 0x3f) { case OpcUaType_Null: break; @@ -1038,6 +1048,7 @@ void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOf case OpcUaType_DataValue: parseDataValue(subtree, tvb, pinfo, &iOffset, "Value"); break; case OpcUaType_Variant: parseVariant(subtree, tvb, pinfo, &iOffset, "Value"); break; } + decrement_dissection_depth(pinfo); } proto_item_set_end(ti, tvb, iOffset); diff --git a/plugins/epan/profinet/packet-dcerpc-pn-io.c b/plugins/epan/profinet/packet-dcerpc-pn-io.c index 34e08aee..a5afda86 100644 --- a/plugins/epan/profinet/packet-dcerpc-pn-io.c +++ b/plugins/epan/profinet/packet-dcerpc-pn-io.c @@ -4519,6 +4519,7 @@ dissect_Diagnosis(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, } static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_AlarmUserStructure(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint16 *body_length, guint16 u16UserStructureIdentifier) @@ -4580,6 +4581,7 @@ dissect_AlarmUserStructure(tvbuff_t *tvb, int offset, /* dissect the alarm notification block */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_AlarmNotification_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 body_length) @@ -4595,6 +4597,8 @@ dissect_AlarmNotification_block(tvbuff_t *tvb, int offset, return offset; } + increment_dissection_depth(pinfo); + offset = dissect_Alarm_header(tvb, offset, pinfo, tree, item, drep); offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep, @@ -4619,6 +4623,8 @@ dissect_AlarmNotification_block(tvbuff_t *tvb, int offset, offset = dissect_AlarmUserStructure(tvb, offset, pinfo, tree, item, drep, &body_length, u16UserStructureIdentifier); } + decrement_dissection_depth(pinfo); + return offset; } @@ -4788,6 +4794,7 @@ dissect_IandM4_block(tvbuff_t *tvb, int offset, } static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_IandM5_block(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) { @@ -5299,6 +5306,7 @@ guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) /* dissect the AssetManagementInfo */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_AssetManagementInfo(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, guint8 *drep) { @@ -5321,6 +5329,7 @@ packet_info *pinfo _U_, proto_tree *tree, guint8 *drep) /* dissect the AssetManagementData block */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_AssetManagementData_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) @@ -5330,7 +5339,9 @@ guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow); return offset; } + increment_dissection_depth(pinfo); offset = dissect_AssetManagementInfo(tvb, offset, pinfo, tree, drep); + decrement_dissection_depth(pinfo); return offset; } @@ -5490,6 +5501,7 @@ dissect_RecordInputDataObjectElement_block(tvbuff_t *tvb, int offset, /* dissect the RecordOutputDataObjectElement block */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_RecordOutputDataObjectElement_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) { @@ -6056,6 +6068,7 @@ dissect_SubmoduleListBlock(tvbuff_t *tvb, int offset, /* dissect the PDevData block */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_PDevData_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) { @@ -6122,6 +6135,7 @@ dissect_CheckMAUTypeExtension_block(tvbuff_t *tvb, int offset, /* dissect the PDPortDataAdjust block */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_PDPortData_Adjust_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength) @@ -6162,6 +6176,7 @@ dissect_PDPortData_Adjust_block(tvbuff_t *tvb, int offset, /* dissect the PDPortDataCheck blocks */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_PDPortData_Check_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength) @@ -6359,6 +6374,7 @@ dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset, /* dissect the PDPortDataRealExtended blocks */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_PDPortDataRealExtended_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength) { @@ -6395,6 +6411,7 @@ dissect_PDPortDataRealExtended_block(tvbuff_t *tvb, int offset, packet_info *pin } static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_PDInterfaceMrpDataAdjust_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength) { @@ -6479,6 +6496,7 @@ dissect_PDInterfaceMrpDataAdjust_block(tvbuff_t *tvb, int offset, static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_PDInterfaceMrpDataReal_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength) { @@ -6556,6 +6574,7 @@ dissect_PDInterfaceMrpDataReal_block(tvbuff_t *tvb, int offset, static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_PDInterfaceMrpDataCheck_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) { @@ -7167,6 +7186,7 @@ dissect_CheckPortState_block(tvbuff_t *tvb, int offset, /* dissect the PDPortFODataReal block */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_PDPortFODataReal_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength) @@ -7440,6 +7460,7 @@ dissect_AdjustDCPBoundary_block(tvbuff_t *tvb, int offset, } static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_MrpInstanceDataAdjust_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength) { @@ -7485,6 +7506,7 @@ dissect_MrpInstanceDataAdjust_block(tvbuff_t *tvb, int offset, } static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_MrpInstanceDataReal_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength) { @@ -7595,6 +7617,7 @@ dissect_PDInterfaceAdjust_block(tvbuff_t *tvb, int offset, /* TSNNetworkControlDataReal */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_TSNNetworkControlDataReal_block(tvbuff_t* tvb, int offset, packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) { @@ -7707,6 +7730,7 @@ dissect_TSNNetworkControlDataReal_block(tvbuff_t* tvb, int offset, /* TSNNetworkControlDataAdjust */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_TSNNetworkControlDataAdjust_block(tvbuff_t* tvb, int offset, packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) { @@ -7906,6 +7930,7 @@ dissect_TSNSyncTreeData_block(tvbuff_t* tvb, int offset, /* TSNDomainPortConfigBlock */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_TSNDomainPortConfig_block(tvbuff_t* tvb, int offset, packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) { @@ -8066,6 +8091,7 @@ dissect_TSNTimeData_block(tvbuff_t* tvb, int offset, /* TSNUploadNetworkAttributesBlock */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_TSNUploadNetworkAttributes_block(tvbuff_t* tvb, int offset, packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) { @@ -8171,6 +8197,7 @@ dissect_TSNExpectedNeighbor_block(tvbuff_t* tvb, int offset, /* TSNExpectedNetworkAttributesBlock */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_TSNExpectedNetworkAttributes_block(tvbuff_t* tvb, int offset, packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) { @@ -8805,6 +8832,7 @@ dissect_PDSyncData_block(tvbuff_t *tvb, int offset, /* dissect the PDIRData block */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_PDIRData_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) { @@ -9209,6 +9237,7 @@ dissect_PDIRBeginEndData_block(tvbuff_t *tvb, int offset, /* dissect the DiagnosisData block */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_DiagnosisData_block(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 body_length) @@ -9257,6 +9286,7 @@ dissect_DiagnosisData_block(tvbuff_t *tvb, int offset, proto_item_append_text(sub_item, " reserved"); } offset = offset +2; /* Advance behind ChannelNumber */ + increment_dissection_depth(pinfo); /* ChannelProperties */ offset = dissect_ChannelProperties(tvb, offset, pinfo, tree, item, drep); body_length-=8; @@ -9281,6 +9311,7 @@ dissect_DiagnosisData_block(tvbuff_t *tvb, int offset, offset = dissect_AlarmUserStructure(tvb, offset, pinfo, tree, item, drep, &body_length, u16UserStructureIdentifier); } + decrement_dissection_depth(pinfo); return offset; } @@ -9379,6 +9410,7 @@ dissect_IOCRProperties(tvbuff_t *tvb, int offset, /* dissect the ARData block */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_ARData_block(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BlockLength) { @@ -9419,6 +9451,7 @@ dissect_ARData_block(tvbuff_t *tvb, int offset, i32EndOffset = offset + u16BlockLength; offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_number_of_ars, &u16NumberOfARs); + increment_dissection_depth(pinfo); /* BlockversionLow: 0 */ if (u8BlockVersionLow == 0) { while (u16NumberOfARs--) { @@ -9667,6 +9700,7 @@ dissect_ARData_block(tvbuff_t *tvb, int offset, proto_item_set_len(ar_item, offset - u32ARDataStart); } } + decrement_dissection_depth(pinfo); return offset; } @@ -9849,6 +9883,7 @@ dissect_FSParameter_block(tvbuff_t *tvb, int offset, /* dissect the FSUDataAdjust block */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_PDInterfaceFSUDataAdjust_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength) @@ -9878,6 +9913,7 @@ dissect_PDInterfaceFSUDataAdjust_block(tvbuff_t *tvb, int offset, /* dissect the ARFSUDataAdjust block */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_ARFSUDataAdjust_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength) @@ -11159,6 +11195,7 @@ dissect_RSInfoBlock_block(tvbuff_t *tvb, int offset, /* dissect the PDIRSubframeData block 0x022a */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_PDIRSubframeData_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) { @@ -12152,6 +12189,7 @@ dissect_CIMSNMPAdjust_block(tvbuff_t *tvb, int offset, /* dissect the MultipleBlockHeader block */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_MultipleBlockHeader_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength) @@ -12190,6 +12228,7 @@ dissect_MultipleBlockHeader_block(tvbuff_t *tvb, int offset, /* dissect Combined Object Container Content block */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_COContainerContent_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar) @@ -12438,6 +12477,7 @@ dissect_RS_AckEvent_block(tvbuff_t *tvb, int offset, /* dissect one PN-IO block (depending on the block type) */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar) { @@ -12493,6 +12533,7 @@ dissect_block(tvbuff_t *tvb, int offset, proto_item_append_text(sub_item, " Block_Length: %d greater than remaining Bytes, trying with Blocklen = remaining (%d)", u16BodyLength, remainingBytes); u16BodyLength = remainingBytes; } + increment_dissection_depth(pinfo); switch (u16BlockType) { case(0x0001): case(0x0002): @@ -12928,6 +12969,7 @@ dissect_block(tvbuff_t *tvb, int offset, default: dissect_pn_undecoded(tvb, offset, pinfo, sub_tree, u16BodyLength); } + decrement_dissection_depth(pinfo); offset += u16BodyLength; proto_item_set_len(sub_item, offset - u32SubStart); @@ -12938,6 +12980,7 @@ dissect_block(tvbuff_t *tvb, int offset, /* dissect any PN-IO block */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_a_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { @@ -12956,6 +12999,7 @@ dissect_a_block(tvbuff_t *tvb, int offset, /* dissect any number of PN-IO blocks */ int +// NOLINTNEXTLINE(misc-no-recursion) dissect_blocks(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { @@ -13909,6 +13953,7 @@ dissect_RecordDataWrite(tvbuff_t *tvb, int offset, #define PN_IO_MAX_RECURSION_DEPTH 100 static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_IODWriteReq(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, pnio_ar_t **ar, guint recursion_count) { @@ -13921,6 +13966,8 @@ dissect_IODWriteReq(tvbuff_t *tvb, int offset, return tvb_captured_length(tvb); } + increment_dissection_depth(pinfo); + /* IODWriteHeader */ offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, ar); @@ -13950,6 +13997,8 @@ dissect_IODWriteReq(tvbuff_t *tvb, int offset, } } + decrement_dissection_depth(pinfo); + return offset; } diff --git a/plugins/epan/wimaxasncp/packet-wimaxasncp.c b/plugins/epan/wimaxasncp/packet-wimaxasncp.c index 082d9eae..4de30ff3 100644 --- a/plugins/epan/wimaxasncp/packet-wimaxasncp.c +++ b/plugins/epan/wimaxasncp/packet-wimaxasncp.c @@ -1789,6 +1789,7 @@ static void wimaxasncp_dissect_tlv_value( /* ========================================================================= */ +// NOLINTNEXTLINE(misc-no-recursion) static guint dissect_wimaxasncp_tlvs( tvbuff_t *tvb, packet_info *pinfo, @@ -1897,8 +1898,9 @@ static guint dissect_wimaxasncp_tlvs( MIN(length, tvb_captured_length_remaining(tvb, offset)), length); - /* N.B. This is a recursive call... */ + increment_dissection_depth(pinfo); dissect_wimaxasncp_tlvs(tlv_tvb, pinfo, tlv_tree); + decrement_dissection_depth(pinfo); } else { |