aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2016-07-05 16:30:28 +0200
committerDario Lombardo <lomato@gmail.com>2016-07-05 21:39:18 +0000
commit1eea415a523646f2758f8ac05973456521755f71 (patch)
tree8e41dae41b7706bac47ca80f126e2e8a412dd4fc
parentaea00239802d33f2fe175c5dff185e0f4b7b1b21 (diff)
bgp: add return check (CID 1354417).
Change-Id: Id8be1d5f6346686087d747167ec44df2b88dd35e Reviewed-on: https://code.wireshark.org/review/16304 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com>
-rw-r--r--epan/dissectors/packet-bgp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dissectors/packet-bgp.c b/epan/dissectors/packet-bgp.c
index 2b324d6c63..a5b6ff3875 100644
--- a/epan/dissectors/packet-bgp.c
+++ b/epan/dissectors/packet-bgp.c
@@ -3502,8 +3502,9 @@ static int decode_bgp_link_nlri_prefix_descriptors(tvbuff_t *tvb,
break;
case BGP_NLRI_TLV_IP_REACHABILITY_INFORMATION:
- decode_prefix4(tlv_sub_tree, pinfo, tlv_sub_item, hf_bgp_ls_nlri_ip_reachability_prefix_ip,
- tvb, offset + 4, 0, "Reachability");
+ if (decode_prefix4(tlv_sub_tree, pinfo, tlv_sub_item, hf_bgp_ls_nlri_ip_reachability_prefix_ip,
+ tvb, offset + 4, 0, "Reachability") == -1)
+ return diss_length;
break;
}