aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btavdtp.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2015-12-01 14:59:51 +0100
committerAnders Broman <a.broman58@gmail.com>2015-12-07 07:15:58 +0000
commit032c33e998c63e27c618ede5e97c42ae1eac2ca7 (patch)
tree077e67e1e635c5e5cfbfb026e958ee8e82dbfa7f /epan/dissectors/packet-btavdtp.c
parentd8bbd232cdd910e70ce15f9a11d0986b6a5c4621 (diff)
btavdtp: fix An unconditional 'break' within a loop found by PVS Studio (V612)
Change-Id: Ic96f670bd4b039e12cdd467b8cc59470dd1553f3 Reviewed-on: https://code.wireshark.org/review/12331 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-btavdtp.c')
-rw-r--r--epan/dissectors/packet-btavdtp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/epan/dissectors/packet-btavdtp.c b/epan/dissectors/packet-btavdtp.c
index 91a81cc626..a4c391a851 100644
--- a/epan/dissectors/packet-btavdtp.c
+++ b/epan/dissectors/packet-btavdtp.c
@@ -2795,7 +2795,7 @@ dissect_aptx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
proto_tree_add_item(aptx_tree, hf_aptx_data, tvb, 0, -1, ENC_NA);
- while (info && info->configuration && info->configuration_length >= 9) {
+ if (info && info->configuration && info->configuration_length >= 9) {
gboolean fail = FALSE;
gdouble expected_speed_data;
gdouble frame_duration;
@@ -2822,7 +2822,7 @@ dissect_aptx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
}
if (fail)
- break;
+ return tvb_reported_length(tvb);
switch (info->configuration[8] & 0x0F) {
case 0x01:
@@ -2838,7 +2838,7 @@ dissect_aptx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
}
if (fail)
- break;
+ return tvb_reported_length(tvb);
sample_bits = 16;
@@ -2879,8 +2879,6 @@ dissect_aptx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
proto_item_append_text(pitem, " ms");
PROTO_ITEM_SET_GENERATED(pitem);
}
-
- break;
}
return tvb_reported_length(tvb);