aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2011-12-09 16:34:02 +0000
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2011-12-09 16:34:02 +0000
commit5225bb3c231c527e369e4f461845d1c05c0a9a51 (patch)
treed1e48eaac27a08de63578ad3018ea304f3bc5235
parent89f64087291fa18d43c37839b9724c89a25f7144 (diff)
From astramax57:
After r38723, some BGP AS_PATH packets were no longer dissected. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40130 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--epan/dissectors/packet-bgp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-bgp.c b/epan/dissectors/packet-bgp.c
index b4e39015bd..d2145542c7 100644
--- a/epan/dissectors/packet-bgp.c
+++ b/epan/dissectors/packet-bgp.c
@@ -2128,7 +2128,7 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
guint d;
asn_len = 2;
k = q;
- while (k < end)
+ while ((k < end) && !unknown_segment_type && !asn_is_null)
{
type = tvb_get_guint8(tvb, k++);
@@ -2142,7 +2142,7 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
length = tvb_get_guint8(tvb, k++);
/* Check for invalid ASN */
- for (d = 0; d < length; d++)
+ for (d = 0; d < length && !unknown_segment_type && !asn_is_null; d++)
{
if(tvb_get_ntohs(tvb, k) == 0)
asn_is_null = 1;