packet-dtn.c break loop if evaluate_sdnv doesn't succeed.

Bug: 13097
Change-Id: If6128f5a3c940b4713c396e1a4a8f002a6bd03b8
Reviewed-on: https://code.wireshark.org/review/18764
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Michael Mann 2016-11-11 21:58:45 -05:00
parent 4fd9872d11
commit 63776db384
1 changed files with 4 additions and 2 deletions

View File

@ -1558,11 +1558,13 @@ display_extension_block(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int
for (i = 0; i < num_eid_ref; i++)
{
evaluate_sdnv(tvb, offset, &sdnv_length);
if (evaluate_sdnv(tvb, offset, &sdnv_length) < 0)
break;
offset += sdnv_length;
block_overhead += sdnv_length;
evaluate_sdnv(tvb, offset, &sdnv_length);
if (evaluate_sdnv(tvb, offset, &sdnv_length) < 0)
break;
offset += sdnv_length;
block_overhead += sdnv_length;
}