aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-asf.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-04-17 21:00:56 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-04-17 21:00:56 +0000
commitdc49bf04c0193a9b0a14a50e36fe3d8720fe6510 (patch)
treea2a601a647804da4ada37b9ae922880c8207086c /epan/dissectors/packet-asf.c
parent3a95e4cd8b2c84961d3a1758b121e14a2284fa9d (diff)
From Evan Huus: Break from the loop if the length is zero. Fix [Bug 7120] ASF infinite loop https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7120
svn path=/trunk/; revision=42113
Diffstat (limited to 'epan/dissectors/packet-asf.c')
-rw-r--r--epan/dissectors/packet-asf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/epan/dissectors/packet-asf.c b/epan/dissectors/packet-asf.c
index 93a8421a15..a73d4b9bd4 100644
--- a/epan/dissectors/packet-asf.c
+++ b/epan/dissectors/packet-asf.c
@@ -235,6 +235,8 @@ dissect_asf_payloads(tvbuff_t *tvb, proto_tree *tree,
plen, "%s: %u bytes",
val_to_str(ptype, asf_payload_type_vals, "Unknown (%u)"), plen);
ptree = proto_item_add_subtree(ti, ett_asf_payload);
+ if (0==plen)
+ break;
proto_tree_add_item(ptree, hf_asf_payload_type, tvb, offset, 1,ENC_BIG_ENDIAN);
proto_tree_add_item(ptree, hf_asf_payload_len, tvb, offset + 2, 2,ENC_BIG_ENDIAN);
if ( ptype && (plen > 4) )